step1.Download and install 64-bit Matlab for linux, if .iso, mount isofirst
(1)create mount directory
sudomkdir mnt
(2)mount iso, e.g. matlab is m.iso
sudomount -o loop m.iso /home/lhi/mnt
(3)dir to mnt and install
cdmnt
sudo./install
Follow matlab install guide, and finish the installation, we install matlabroot in /usr/local/Matlab2010a
(4)link matlab to start it by using command matlab.
cd/usr/local/bin
ln-s matlabroot/bin/matlab matlab
Type matlab in the terminal, and if this error information comes in matlab command window:
Cannot write to preference file “matlab.prf” in “home/user/.matlab/R2010a”
The desktop configuration was not saved successfully.
解决方法:终端输入 sudo chmod 777 /home/user(自己的登录用户名)/.matlab/R2010a/matlab.prf
和 sudo chomd 777 /home/user(自己的登录用户名)/.matlab/R2010a
If the terminal which opens matlab gives the following error:
/usr/local/Matlab2010a/bin/util/oscheck.sh: 605: /lib64/libc.so.6: not found
Solution: Run the following command in a terminal:
sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6
Reference:
常见问题:在终端下运行matlab出现/bin/util/oscheck.sh: 605: /lib64/libc.so.6: not found的错误。解决办法:打开终端,输入sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6后回车即可(注意自己的x86_64-linux-gnu的位置,有的可能在lib64的文件夹下面,对应修改下命令即可)。32位的命令为sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6。