Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   FrostWire (https://www.gnutellaforums.com/frostwire/)
-   -   4.10.9 will not run - syntax error (https://www.gnutellaforums.com/frostwire/53381-4-10-9-will-not-run-syntax-error.html)

tomk February 22nd, 2006 02:51 AM

4.10.9 will not run - syntax error
 
I've just upgraded from 4.10.5 to 4.10.9, running on Linux. 4.10.5 worked perfectly, but I get the following error with 4.10.9:

$ frostwire
: command not found:
: No such file or directory
: command not found:
: command not found3:
'unFrost.sh: line 24: syntax error near unexpected token `
'unFrost.sh: line 24: `look_for_java()

The error is somewhere in /usr/lib/frostwire/runFrost.sh. If I install 4.10.9, and then replace runFrost.sh with its 4.10.5 version, it works fine. Diffing the files tells me that every line has changed, even though they all look exactly the same to me.

Any ideas, anyone?

ultracross February 22nd, 2006 04:15 AM

Which platform package are you using? And can you compare the lines in the script and tell me what the differences are?

tomk February 22nd, 2006 05:57 AM

I'm using the FrostWire-4.10.9-1.tar.gz tarball on Arch Linux, and as I mentioned, there is no difference between the two scripts to the human eye. If I diff them, I get this:

Code:

--- /home/tomk/runFrost5.sh    2006-02-22 10:34:46.000000000 +0000
+++ runFrost.sh 2006-02-20 09:07:38.000000000 +0000
@@ -1,119 +1,119 @@
-#!/bin/sh
-#
-# Runs LimeWire.  This script must be executed in your LimeWire
-# install directory.
-   
-# this should allow starting limewire from
-# gui-based explorer interfaces
-cd "`dirname "$0"`"
-
-<snip>Every line of original script</snip>
-
-if [ $? -ne 0 ]; then
-    echo
-    echo "******************************************************************"
-    echo "Something went wrong with FrostWire."
-    echo "Maybe you're using the wrong version of Java?"
-    echo "(LimeWire is tested against and works best with with Sun's JRE, Java 1.4+)"
-    echo "The version of Java in your PATH is:"
-    java -version
-    echo
-fi
+#!/bin/sh
+#
+# Runs LimeWire.  This script must be executed in your LimeWire
+# install directory.
+
+# this should allow starting limewire from
+# gui-based explorer interfaces
+cd "`dirname "$0"`"
+
+<snip>Every line of new script</snip>
+
+if [ $? -ne 0 ]; then
+    echo
+    echo "******************************************************************"
+    echo "Something went wrong with FrostWire."
+    echo "Maybe you're using the wrong version of Java?"
+    echo "(LimeWire is tested against and works best with with Sun's JRE, Java 1.4+)"
+    echo "The version of Java in your PATH is:"
+    java -version
+    echo
+fi

In other words, the system sees every line of the new script as a change from the original script, even though you or I don't.

ultracross February 22nd, 2006 06:23 AM

Thanks, I'll look into it.

[edit: i'll actually have greg look into it]

tomk February 22nd, 2006 06:46 AM

Much appreciated.

Let me know if you need any more info.

tomk February 22nd, 2006 07:12 AM

Actually, I have the fix. It occurred to me that as Frostwire is cross-platform, the script might have been edited on Windows, which would cause it not to work on *nix. I ran
Code:

tr -d '\15\32'
over it to remove carriage returns and Ctrl-Zs, and it works now.

ultracross February 22nd, 2006 04:54 PM

hmm... I did build it on windows, but im sure I didnt edit any unix/linux scripts. I'll have gregorio build the *nix binaries and see if that fixes it.

limewire February 22nd, 2006 05:53 PM

I can confirm the bug and fix. Nice catch tomk.

Ulfgar March 13th, 2006 02:15 PM

Same error
 
Im getting the same messege as mentioned in the original post when trying to run frostwire... Im pretty new to linux, can someone please explain how to fix it so a person who know close to nothing about linux can understand??

tomk March 13th, 2006 03:12 PM

You need to do the following in a terminal, as root:

Code:

cat /usr/lib/frostwire/runFrost.sh | tr -d '\15\32'

ultracross March 13th, 2006 04:39 PM

Is this still happening with the new linux builds?

Ulfgar March 13th, 2006 06:39 PM

Well....
 
That didnt work.... I typed it in a terminal window as root and got this

#!/bin/sh
#
# Runs LimeWire. This script must be executed in your LimeWire
# install directory.

# this should allow starting limewire from
# gui-based explorer interfaces
cd "`dirname "$0"`"

# try to discover java
MSG0="Loading FrostWire:"
MSG1="Starting FrostWire..."
MSG2="Java exec found in "
MSG3="OOPS, your java version is too old "
MSG4="You need to upgrade to JRE 1.4.x or newer from http://www.java.com"
MSG5="Suitable java version found "
MSG6="Configuring environment..."
MSG7="OOPS, you don't seem to have a valid JRE. FrostWire works best with Sun JRE available at http://www.java.com "
MSG8="OOPS, unable to locate java exec in "
MSG9=" hierarchy"
MSG10="Java exec not found in PATH, starting auto-search..."
MSG11="Java exec found in PATH. Verifying..."

look_for_java()
{
JAVADIR=/usr/lib
if look_for_javaImpl ; then
return 0
fi
JAVADIR=/usr/java
if look_for_javaImpl ; then
return 0
fi
JAVADIR=/opt
if look_for_javaImpl ; then
return 0
fi
return 1
}

look_for_javaImpl()
{
IFS=$'\n'
potential_java_dirs=(`ls -d1 "$JAVADIR"/j* | sort | tac`)
for D in "${potential_java_dirs[@]}"; do
if [[ -d "$D" && -x "$D/bin/java" ]]; then
JAVA_PROGRAM_DIR="$D/bin/"
echo $MSG2 $JAVA_PROGRAM_DIR
if check_version ; then
return 0
fi
fi
done
echo $MSG8 "${JAVADIR}/" $MSG9 ; echo $MSG4
return 1
}

check_version()
{
# short-circuit gcj
ISGCJ=`${JAVA_PROGRAM_DIR}java -version 2>&1 | grep -i gcj`
if [ "$ISGCJ" != "" ] ; then
echo $MSG7
return 1
fi

JAVA_HEADER=`${JAVA_PROGRAM_DIR}java -version 2>&1 | head -n 1`
JAVA_IMPL=`echo ${JAVA_HEADER} | cut -f1 -d' '`
if [ "$JAVA_IMPL" = "java" ] ; then
VERSION=`echo ${JAVA_HEADER} | sed "s/java version \"\(.*\)\"/\1/"`
if echo $VERSION | grep "^1.[0-3]" ; then
echo $MSG3 "[${JAVA_PROGRAM_DIR}java = ${VERSION}]" ; echo $MSG4
return 1
else
echo $MSG5 "[${JAVA_PROGRAM_DIR}java = ${VERSION}]" ; echo $MSG6
return 0
fi
else
echo $MSG7 "[${JAVA_PROGRAM_DIR}java = ${JAVA_IMPL}]" ; echo $MSG4
return 1
fi
}

echo $MSG1

# locate and test the java executable
if [ `uname` = "Linux" ]; then
if ! command -v java &>/dev/null; then
echo $MSG10
if ! look_for_java ; then
exit 1
fi
else
echo $MSG11
if ! check_version ; then
if ! look_for_java ; then
exit 1
fi
fi
fi
else
JAVA_PROGRAM_DIR=""
fi

echo $MSG0

export J2SE_PREEMPTCLOSE=1

${JAVA_PROGRAM_DIR}java -Dorg.apache.commons.logging.Log=org.apache.commons .logging.impl.NoOpLog -Djava.library.path=. -jar FrostWire.jar
if [ $? -ne 0 ]; then
echo
echo "************************************************* *****************"
echo "Something went wrong with FrostWire."
echo "Maybe you're using the wrong version of Java?"
echo "(LimeWire is tested against and works best with with Sun's JRE, Java 1.4+)"
echo "The version of Java in your PATH is:"
java -version
echo
fi
[root@localhost user]#


I know my version of java is current because when i type java -version it comes up with

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

jojoman02 March 13th, 2006 09:59 PM

I resolved this problem very simply.

Using nano as root i opened the file, which was DOS format.


DO THE FOLLOWING AS ROOT (OR SUDO) in a Terminal
=========================================

1) nano /usr/lib/frostwire/runFrost.sh

2) then save in nano CTRL+O

3) here you can hit ALT+D to change the format. Then hit enter to save the file.

Note:
make sure after hitting CTRL+O the filename it doesn't have [DOS Format] before it.

Frostwire should now work,

I wish the frostwire team would repack the DEB file, because everyone who downloads the latest frostwire (on linux) will have this issue.

tomk March 13th, 2006 11:49 PM

Sorry Ulfgar - I was a bit distracted, and gave an incomplete procedure.

jojoman's suggestion would probably suit you better anyway.

ultracross March 14th, 2006 02:08 AM

Quote:

Originally posted by ultracross
Is this still happening with the new linux builds?
I still need to know if this is happening to the new builds, otherwise I cannot know if we still need to work on this problem.

tomk March 14th, 2006 02:37 AM

I use the tarball only, and that hasn't changed, so I can't help you there.

Ulfgar March 19th, 2006 08:09 PM

Working now
 
Alright,
That fixed it. I was a bit confused there for a bit becuase I didnt have nano installed, but Its working now. Thanks for the help, and hopefully this can help others with the same problems as me. As for the question about this happening to new builds, it must be becuase I got the newest build of the main frostwire page when I was having this problem, I guess its version 4.10.9.

bugmenot April 12th, 2006 06:35 PM

This bug still occurs using the latest DEB-package (just downloaded) on Debian Etch. Please fix it. :eek:

ultracross May 25th, 2006 01:31 AM

Ok, we re-released the linux versions today. But, we had to take down the RPM, its giving us ALOT of trouble. So, if there are any users that are using an RPM-based distro and know how to create them, please give us an email at: frostwire@gmail.com

Thanks.


All times are GMT -7. The time now is 12:03 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.