Wednesday, February 29, 2012

Installing MATLAB on Linux

Notes:
  1. These instructions have been tested for MATLAB R2011a on Lubuntu 11.10.
  2. For more details, refer to install_guide.pdf in MATLAB setup ISO/folder. You can get this file (and complete official MATLAB documentation) for free (just create a free MathWorks account) at:
I followed these steps to install MATLAB on Lubuntu Linux:
  1. Extract or mount the MATLAB ISO file. Let's assume that you extracted MATLAB ISO file to
    /home/user/matlab
  2. Change to the extracted directory and run:
    cd /home/user/matlab
    sudo ./install
  3. When I ran above command, I got this error message (and installer exited without completing the install):
    user@system:~/matlab$ sudo ./install 
    [sudo] password for user: 
    Preparing installation files ...
    Installing ...
    eval: 1: /tmp/mathworks_2463/java/jre/glnx86/jre/bin/java: Permission denied
    Finished
    user@system:~/matlab$
    MathWorks India has a solution page to this problem. It lists the cause of problem and a solution. But this solution is better (imho) and worked very well for me! All you need to do is run following command on terminal/console:
    • For Linux (32-bit):
      chmod ugo+x /home/user/matlab/java/jre/glnx86/jre/bin/java
    • For Linux (64-bit):
      chmod ugo+x /home/user/matlab/java/jre/glnxa64/jre/bin/java
    Google has loads of related stuff if you search for "matlab java Permission denied".
  4. Don't start MATLAB after installation. Run these commands on terminal [1]:
    mkdir ~/.matlab
    sudo chown -R ${USER}:${USER} ~/.matlab
  5. MATLAB got installed (by default) to /usr/local/MATLAB. To run matlab use:
    /usr/local/MATLAB/R2011a/bin/matlab
[1] http://thameera.wordpress.com/2010/10/21/installing-matlab-2008a-on-ubuntu-10-10/

No comments:

Post a Comment