Matlab problem on ubuntu 16.04

Solution 1:

Try to install matlab-support,but first you'll need to check whether multiverse is already included or not.

sudo gedit /etc/apt/sources.list

If not included yet, then add this line

deb http://us.archive.ubuntu.com/ubuntu xenial main multiverse

Update your system and install the package

sudo apt-get update
sudo apt-get install matlab-support

Then follow the instruction. It works for me. Source : http://installion.co.uk/ubuntu/xenial/multiverse/m/matlab-support/install/index.html

Solution 2:

I had the same problem and getting matlab-support doesn't helped me instead the following steps solved my problem:-

locate libstdc++.so.6

and then a long list will open search the matlab option, for me it was :-

/usr/local/MATLAB/MATLAB_Production_Server/R2015a/sys/os/glnxa64/libstdc++.so.6
/usr/local/MATLAB/MATLAB_Production_Server/R2015a/sys/os/glnxa64/libstdc++.so.6.0.17

Then change libstdc++.so.6 to libstdc++.so.6.old and libstdc++.so.6.0.17 to libstdc++.so.6.0.17.old by the following commands

cd /usr/local/MATLAB/MATLAB_Production_Server/R2015a/sys/os/glnxa64 

(or whatever your path is)

sudo mv libstdc++.so.6 libstdc++.so.6.old 
sudo mv libstdc++.so.6.17 libstdc++.so.6.17.old

and matlab will work now as explained in Yihui He answer here: Doesn't Matlab work on ubuntu 16.04?