Running Multiverse servers on Ubuntu Linux
From Multiverse
You must take some special steps to run the Multiverse servers on Ubuntu Linux.
Installing and running Java
Ubuntu comes preinstalled with a non-standard version of Java (GNU Java) that will not work with Multiverse. So, you must:
- Install the standard Sun Java distribution (see Getting Started for link).
- Make sure that the "java" command invokes it and not GNU Java.
I found some docs on the web that might be helpful: https://help.ubuntu.com/community/Java#head-fef9352fb26820bb774df978180c9dd3a60e777b
You can generally confirm the version of Java with the command
java -version
This result of this command should yield the version of Sun Java you downloded, not Java 1.4.2, which is apparently the default that comes with Ubuntu. For example:
java version "1.5.0_08" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03) Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
Starting the servers
When using Ubuntu, you may get this error message when you try to run multiverse.sh:
Syntax error: "(" unexpected
To correct this, edit multiverse.sh and replace the first line of the file:
#!/bin/sh
with this:
#!/bin/bash
Save the file and run it.
Fix issues with #!/bin/sh in ubuntu edgy eft
Ubuntu took a long time standard and changed it, thus breaking a number of applications. Have you ever tried to install something on Ubuntu or run an old script, and had an inexplicable error? It may well be caused by the /bin/sh bug.
What they did:
The file /bin/sh has been symlinked to /bin/bash. bash is the most common linux command line shell. Because of this, most application developers start their shell scripts with the line:
#!/bin/sh
and they expect that their shell script will run in the bash shell. Ubuntu has symlinked /bin/sh to /bin/dash. dash is a Debian derived light version of bash, and for some reason, it often breaks scripts that expet the bash shell. Scripts often break.
How To Fix:
Simply change the symlink so that it points to /bin/bash. To do this, open a terminal, and type the following:
* sudo rm -f /bin/sh * sudo ln -s /bin/bash /bin/sh
From now on your scripts should work as their authors expected.
