Contents

General installation

Use the following commands to mount and install Matlab. Note that the path to the install script should contain no spaces, or the install will fail. For graphical install and interface libxp is needed. You may need to installlibxp from the official repositories first. Note also that Matlab is not compliant with Java 7, so you may need to install, for example, openjdk6.
Install from iso file:

After fixing any library dependency problems, you will be able to guide the installer through the install process. If activation doesn't work in the installer you'll need to login to Wolfram's site and download a license file which you'll put in ${MATLAB}/licenses. After the install process, you'll need to create a symbolic link because the installer oddly thinks it's installing the 64-bit version of Matlab:

$ cd ${MATLAB}/sys/java/jre
$ ln -s glnx86 glnxa64

In the above, ${MATLAB} should be replaced by the root directory you chose for your installation.

You'll also need to put another link in Matlab's bin folder because despite asking Matlab to install the 32bit version, it still thinks you want to use the 64bit one:

$ cd ${MATLAB}/bin
$ ln -s glnx86 glnxa64

After that you'll need to edit the ${MATLAB}/bin/matlab script to get the java settings correct. After the comments at the top of the file, you'll need the line:

export MATLAB_JAVA=/path/to/jre

Where /path/to/jre will be /opt/java/jre if you're using Sun's JRE. The path is one level up from where rt.jar is located. That is, rt.jar should be in /opt/java/jre/libs if you used /opt/java/jre for MATLAB_JAVA. In Matlab R2010a it works pretty well, if you use the internal JRE with:

At this point you may have to resolve more library dependencies or troubleshoot Java. Your version of Matlab may need a specific version of Sun's JRE installed.

Troubleshooting

As one installs Matlab, it might complain that it can't find a package, for the most part just look at the package name and then install it with Pacman, or in the case of x86_64 there are some libraries only in AUR.

Resolving start warnings/errors

Even if all needed libraries are installed, Matlab when starting can still report some missing libraries. This is resolved by symbolic linking of needed libraries to directories that Matlab checks at start-up. For example, if Matlab triggers error/warning about missing /lib64/libc.so.6 library, this can be resolved by:

# ln -s /lib/libc.so.6 /lib64

Matlab R2011b with an up-to-date Arch Linux (as of March 12, 2012) fails on startup with the familiar "Failure loading desktop class." A solution is to point Matlab to the system JVM (confirmed to work with the jdk7-openjdk package):

With the NVIDIA card all it required to start working was to copy the libGLU.so from the Matlab installed library ${MATLAB}/sys/opengl/lib/glnx86/libGLU.so to /usr/lib directory. Note that in x86_64 this might be a different directory.