Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

While installing netbeans-6.9.1 I got following error:

./netbeans-6.9.1-ml-linux.sh: 1897: Syntax error: "(" unexpected (expecting ";;")

What may be the reason? I have downloaded the installer from netbeans.org.

share|improve this question
    
Any reason why you don't wantto install netbeans from software center - sudo apt-get install netbeans? The version there is also 6.9 –  Chakra Feb 4 '11 at 5:55
    
i want to install 6.9.1 so –  kamal Feb 4 '11 at 6:23

2 Answers 2

up vote 2 down vote accepted

Try sh ./netbeans-6.9.1-ml-linux.sh .

Or anyway, that worked for me:

$ sh netbeans-6.9.1-ml-linux.sh 
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...

If that's not working, we may need to look at whether you have any missing dependencies....

In the installer I just downloaded, line 1897 is:

            printf "Executando o assistente do instalador...\n"

Not a "(" in sight on mine.

Here's the md5sum of the file I have:

$ md5sum  netbeans-6.9.1-ml-linux.sh 
9b00ecdc6e7a80dec5b882343d0ed6db  netbeans-6.9.1-ml-linux.sh

And here's my system (Ubuntu 10.10 with uname -a) :

Linux mercator 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux
share|improve this answer
    
i found that there the file was not donwloaded properly. its md5 sum doesnt match. i downloaded net installer and installed successfully. –  kamal Feb 16 '11 at 9:56

Look at the very first line of the script: does it try to run with /bin/sh? If so, change that first line to cause the script to run with BASH instead:

#!env bash

or

#!/bin/bash

Because /bin/sh is a symlink to /bin/dash, which might be the cause. Or you could invoke the script with bash directly:

bash $script

Or you could install from repository:

sudo apt-get install netbeans
share|improve this answer
    
It does have ` #!/bin/sh ` -- what's the technical reason for running it under bash, though? –  belacqua Feb 4 '11 at 19:07
    
It's not hard to find discussions on that! Maybe a good starting point: wiki.ubuntu.com/DashAsBinSh. –  user8290 Feb 4 '11 at 20:16
    
In short, /bin/sh on Ubuntu is a symbolic link to /bin/dash. Historically on Linux, /bin/sh has often been a symbolic link to /bin/bash. The way people should write their scripts for "any *nix" has changed, but few script writers have adopted those changes. –  user8290 Feb 9 '11 at 19:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.