I'm trying to install Matlab 2014a on Debian Testing. When I run the install script with

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

I get this output

Preparing installation files ...
Installing ...
Error: dl failure on line 894
Error: failed /tmp/mathworks_11967/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so, because /tmp/mathworks_11967/bin/glnxa64/libstdc++.so.6: invalid ELF header

I'm installing from an .iso, running this script from it's root directory (matlab).
libstdc++.so.6 is in matlab/bin/glnxa64/libstdc++.so.6.

Here's my java version:

$java -version
java version "1.7.0_85"
OpenJDK Runtime Environment (IcedTea 2.6.1) (7u85-2.6.1-3)
OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)

Does anyone have any ideas? I have been pulling my hair out for hours, and I can't use Python or Octave as Matlab is required for a course I'm taking. I've scoured forums for hours, the only other person with the exact same error as me was here and they never got an answer.

EDIT: Solved it. First thing: do not attempt to install a version of matlab on an operating system it does not officially support. 2014a only supports Debian Squeeze and Ubuntu 12.04, 13.04, and 13.10.

I set up a VM running Ubuntu 12.04.5, extracted the .iso on my host machine and copied the directory to my VM's home folder. I did not mount the iso.

Then I had to remove matlab/bin/glnxa64/libstdc++.so.6 and replace it with the file named libstdc++.so.6.0.17 in the same folder. libstdc++.so.6 is supposed to be a symbolic link to the other library, however if you try to mount the iso directly it often breaks the link and replaces it with a text file.

When I was attempting to install Matlab by mounting it on the VM, I got the same error. I managed to remove it by replacing the copy of libstdc++.so.6 with the one located in /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.so. Then I began to get java errors, and it turns out that the matlab/java/jar/professionalinstaller.jar file was corrupted. I had extracted the iso before I began all of this, which is how I could go back to before that jar became corrupted. Hopefully this post is of use to some other poor soul forced to use Matlab in the future.


I have got the same problem while installing the 2013 version on Debian 8 using an iso image.


The solution that worked for me consists in renaming the libstdc++.so.6 file to libstdc++.so.6.0.13 in the iso image' bin/ directory. After that, I issued the command:

# ./install -x

to start graphical installation. Finally, it worked!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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