Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Matlab version 2012. I know there are many threads about this, suggesting to chmod +x the following files (if you are in installation directory):


I also chmodded the install file in root of installation directory. However, after running sudo ./install I still get:

Preparing installation files ...
Installing ...
./install: 1: eval: /tmp/mathworks_4880/sys/java/jre/glnxa64/jre/bin/java: Permission denied

How is this possible? :)

share|improve this question
If you have extracted the iso then you get this error. Try to mount it. Everything works well after that. (For R2013a Release) – user236202 Jan 15 '14 at 19:06

10 Answers 10

Even at your 64bit system, the installation might as well work out coz i have just successfully installed Matlab2012a in mine... here's what i did.. : the /matlab-install-files/sys/java/jre/glnx86/jre/bin/java ,i did

 sudo chmod +x ./java

2.within the installation directory:

 sudo chmod +x ./install

3.finally, install by:



 sudo ./install
share|improve this answer
This works on a Mac, too! Thank! – Abramodj May 9 '15 at 7:32

i had the same problem with Matlab 2014a, i tried to change permissions of the


but it wouldn't i still don't know the reason why, so i took the whole sys/java/jre/glnxa64/jre directory and copied it to my Desktop where i changed the permissions to

    chmod 777 /home/$USER/Desktop/jre/bin/java

and i started the installation with

    sudo bash ./install -javadir '/home/$USER/Desktop/jre'

and it worked perfectly

share|improve this answer

Installing Matlab (which is 32-bit) on 64-bit Ubuntu causes this problem. You can try this command and proceed like normal again.

ln -s YOURMATLABFOLDER/sys/java/jre/glnx86 YOURMATLABFOLDER/sys/java/jre/glnxa64
share|improve this answer
This didn't seem to help. See output. – Primož Kralj Sep 6 '12 at 17:58
Then I can't help you I'm afraid. This was the suggestion I got from Mathworks support. Didn't really work for me either. Luckily for me I have to run dual boot on this computer, due to other heavy applications that run under windows only. – Erro Sep 10 '12 at 9:02
Still, thank you. – Primož Kralj Sep 10 '12 at 19:41

I did the following on my 64-bit Ubuntu and it worked.

chmod +x <MATLAB_DIRECTORY>/sys/java/jre/glnx86/jre/bin/java

<MATLAB_DIRECTORY> is the directory where you have all the MATLAB installation files in.

Then, in the install script (<MATLAB_DIRECTORY>/install), change line 441 from




And then run ./install in the <MATLAB_DIRECTORY>

share|improve this answer

I tried every solution in here and couldn't install 32-Bit Matlab on 64-bit Linux.

Then I tried this:

In order to install 32-bit MATLAB on a 64-bit Linux machine, it is necessary to use the -glnx86 flag:

./install -glnx86

The -glnx86 flag is required for starting MATLAB. If you are running a license manager, it is required for all license manager scripts as well (lmstart, lmdown, lmstat, etc...).

Some users have problems loading the JRE when running in this configuration. Creating a symlink in $MATLAB/sys/java/jre named 'glnxa64' pointing to 'glnx86' should resolve this issue. You can do this with the following command:

ln -s $MATLAB/sys/java/jre/glnx86 $MATLAB/sys/java/jre/glnxa64

(where $MATLAB is the MATLAB installation folder) `

share|improve this answer
up vote 0 down vote accepted

I've found the answer, no matter how weird it is. The problem was 64bit OS. When I tried with 32bit, Matlab installation worked and every other app I had previously trouble installing. So now I stick to 32bit.

share|improve this answer

In many cases, the file system on which the install disk is mounted, is such that the file's permission cannot be changed to +x. In such cases, open the install script, go to somewhere around line which does echo Installing.... and eval $java_cmd. Just put a read between these two lines. Then, in another tab, go to /tmp/mathworks_<some-4-digit-random-number>/sys/java/jre/glnxa64/jre/bin/ and do chmod +x java. Then in the previous tab, press enter.

share|improve this answer

I assumed the appropriate symbolic link is, instead, something like

ln -s MATLABLOCATION/sys/java/jre/glnxa64 MATLABLOCATION/sys/java/jre/glnx86

If you want to link the missing x86 JRE folder with the existant x64 of your install location.

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – guntbert Jun 1 '14 at 16:54

There's also a file called install_unix which you have to apply the chmod +x trick to. Can't remember which folder it's in, but it'll be clear straight away as it's not in a subfolder.

Also, when you're selecting which components to install, there's a reason the licence manager is automatically not selected. Please leave it unselected - it'll just cause trouble.

Make sure the installation folder is correct, as this can't really be changed otherwise. I had to move it for administrative reasons, but eventually gave up trying and just reinstalled (though that might have cost my University some money).

Another thing that might help is to take the option to install scripts (something like that) so that there's a file you run to actually start MATLAB. You can make do without this option, but then every time you start you'll have to directly access a critical program file, which might be a little bit dangerous. Don't worry about the folder where these scripts are installed, as you can make copies and wherever they are, when run they'll link to the MATLAB root folder.

Once you've installed, it might help to change the startup directory by right clicking in the directory bar and selecting preferences. The startup directory should be where you want to keep MATLAB-related files you made yourself, like scripts and functions & maybe results from running them/other data. It might be really dangerous to use the MATLAB root folder for this sort of thing.

It's not necessary to alter the install_info file as the installation options are determined using a dialog box interface.

You might like to install a desktop shortcut to access MATLAB without opening a terminal. For this, the terminal needs to be operated in bash mode. I got the shortcut installed, but I don't think I understand how so I'll leave you to work that out/look it up.

share|improve this answer

You may try this for the 64 bit version if doing chmod on java file doesn't work:

-Make a tmp directory in your home directory
-now run install using "./install -tmpdir <path to the above made tmp directory>"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.