Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While installing netbeans-6.9.1 I got following error:

./ 1897: Syntax error: "(" unexpected (expecting ";;")

What may be the reason? I have downloaded the installer from

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
up vote 2 down vote accepted

Try sh ./ .

Or anyway, that worked for me:

$ 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 

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



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: – 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


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.