Installing the Matlab Runtime Environment on CentOS 6

I was having some trouble to get the Matlab Runtime Environment (MCR) 2012b running on CentOS 6.4. After downloading and extracting the ZIP archive from the Matlab website I received an error when trying to run the install shell-script.

Installing ...

./install: line 705: /tmp/mathworks_28467/sys/java/jre/glnxa64/jre/bin/java: Access denied


First thing I tried was modifying the install shell script to make the java-jre executable after copying. This didn’t help though, next thing I tried was disabling SELinux, no luck either. After that I modified the shell script and disabled the part that deleted the temporary directory so I had some more time for inspection. This showed that the permissions on the java executable where indeed in order. Well that’s odd ..

The solution here was to use another temporary directory that was not under /tmp . You can specify an temporary directory to the installer by using the option -tmpdir.

Two more things, because I was installing on a server VPS there was no X11 so I had to use -mode silent, which gave me an new error about accepting the license agreement. So all these problems solved at once:

cd ~


unzip -d mcr_unzipped

mkdir tmp

mcr_unzipped/install -tmpdir ~/tmp -mode silent -agreeToLicense yes