12:19 - Wednesday, 16 April 2014

How To Fix Java Problem Installing Matlab 2012a (64-bit) In Ubuntu 12.04 (64 Bit)?

#Topics: /tmp/mathworks/sys/java/jre/glnxa64/jre/bin/java: libjli so,/tmp/mathworks_ /sys/java/jre/glnxa64/jre/bin/java: error while loading shared libraries: libjli so:,how to install matlab 2012a mint 16,how to install matlab on ubuntu 12 04,matlab 2012a jre

I am trying to install Matlab 2012a (64-bit) in Ubuntu 12.04LTS (64-bit). I have installed Java 7. My Java version is:

sabyasachi@sabyasachi-ubuntu:~/Downloads/R2012a_UNIX$ java -versionjava version "1.7.0_05"Java(TM) SE Runtime Environment (build 1.7.0_05-b05)Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode

I am getting the following error while installing Matlab:

sabyasachi@sabyasachi-ubuntu:~/Downloads/R2012a_UNIX$ ./install Preparing installation files ...Installing .../tmp/mathworks_18824/sys/java/jre/glnxa64/jre/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directoryFinished

How can I fix this problem?

When I use -v (verbose) option I am getting the following:

sabyasachi@sabyasachi-ubuntu:~/Downloads/R2012a_UNIX$ sudo ./install -vPreparing installation files ...->  DVD                 = /home/sabyasachi/Downloads/R2012a_UNIX->  ARCH                = glnxa64->  DISPLAY             = :0->  TESTONLY            = 0->  JRE_LOC             = /tmp/mathworks_26521/sys/java/jre/glnxa64/jre->  LD_LIBRARY_PATH     = /tmp/mathworks_26521/bin/glnxa64Command to run:/tmp/mathworks_26521/sys/java/jre/glnxa64/jre/bin/java  -splash:"/home/sabyasachi/Downloads/R2012a_UNIX/java/splash.png" -Djava.ext.dirs=/tmp/mathworks_26521/sys/java/jre/glnxa64/jre/lib/ext:/tmp/mathworks_26521/java/jar:/tmp/mathworks_26521/java/jarext:/tmp/mathworks_26521/java/jarext/axis2/:/tmp/mathworks_26521/java/jarext/guice/:/tmp/mathworks_26521/java/jarext/webservices/ com/mathworks/professionalinstaller/Launcher -root "/home/sabyasachi/Downloads/R2012a_UNIX" -tmpdir "/tmp/mathworks_26521" Installing .../tmp/mathworks_26521/sys/java/jre/glnxa64/jre/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directoryFinishedsabyasachi@sabyasachi-ubuntu:~/Downloads/R2012a_UNIX$

I had the same problem and was able to fix it with following steps. Open terminal Ctrl+Alt+T and run following command.

  1. Install JRE if you don’t have it already.

    sudo apt-get install openjdk-7-jre
  2. Invoke the installer with -javadir option

    sudo ./install -javadir  /usr/lib/jvm/java-7-openjdk-amd64/jre

Your Java/JRE probably has nothing to do with this – Matlab is using it’s own JRE and that’s what’s giving you the error (notice the path).

  • Make sure Matlab’s java is executable, with chmod +x sys/java/jre/glnxa64/jre/bin/java from the top-level folder (which appears to be ~Downloads/R2012a_UNIX for you) [source]

  • Run the installer with:

    sudo ./install -v
  • This should most probably work; if not, please edit your question with the extended output the verbose (-v) option will give you.

As noted, MATLAB has its own (greatly out of date) copy of the JRE, but you can make it use another simply by pointing the MATLAB_JAVA environment variable to the directory containing the JRE you want it to use.

Be aware that Matlab is not compatible with Java 7 (at the moment at least).