Ubuntu16.04安装matlab2016b

1. 下载安装文件

从这里下载,下载以后三个文件,
1. R2016b_glnxa64_dvd1.iso
2. R2016b_glnxa64_dvd2.iso
3. Matlab 2016b Linux64 Crack.rar
关于三个文件,可以在windows先解压好。如果先麻烦,也可以在linux下解压

$ sudo apt-get install rar
$ rar e Matlab\ 2016b\ Linux64\ Crack.rar

2. 挂载

我把1中的三个文件直接copy到了/home下,安装完以后删掉就可以了

$ cd ~
$ mkdir matlab 
$ sudo mount -t auto -o loop R2016b_glnxa64_dvd1.iso matlab/

3. 安装

挂载以后会发现一个多了一个盘,说明挂载成功,进行安装:

$ sudo ./matlab/install

在安装过程中
选择 Use a File Installation Key—–I have the File installation Key for my license
在这里输入的是在1中crack.rar解压出的readme.txt中的序列号,选择这一组:09806-07443-53955-64350-21751-41297
如果安装包不是我这里下载的,那么序列号就不是我这里写的,而是你安装包的readme.txt的第一个,不然之后会有问题

I offer two modes of installation:

1) standalone:
- Install choosing the option "Use a File Installation Key" and supply the following FIK
    09806-07443-53955-64350-21751-41297
- To install Matlab Production Server,using this
    40236-45817-26714-51426-39281
- Use license_standalone.lic to activate,
  or make a "licenses" folder in %installdir% and copy license_standalone.lic to it,and run matlab without activation
- after the installation finishes copy the folders to %installdir% to overwriting the originally installed files

2) floating license (network license server):
- Install choosing the option "Use a File Installation Key" and supply the following FIK
    31095-30030-55416-47440-21946-54205
- To install Matlab Production Server,using this
    57726-51709-20682-42954-31195
- Use license_server.lic when asked
- after the installation finishes copy the folders to %installdir% to overwriting the originally installed files

4. 激活

从安装目录打开:

$ cd /usr/local/MATLAB/R2016b/bin
$ ./matlab # 如果是第一次运行,建议加sudo

选择 Activate manually without the internet载入/home/****/license_standalone.lic 安装结束后。
把Crack文件夹中R2016b/Linux/R2016b/bin/glnxa64四个文件,复制到/usr/local/MATLAB/R2016b/bin/glnxa64目录下:

$ sudo cp Crack/R2016b/bin/glnxa64/libcufft.so.7.5.18 /usr/local/MATLAB/R2016b/bin/glnxa64
$ sudo cp Crack/R2016b/bin/glnxa64/libinstutil.so /usr/local/MATLAB/R2016b/bin/glnxa64
$ sudo cp Crack/R2016b/bin/glnxa64/libmwlmgrimpl.so /usr/local/MATLAB/R2016b/bin/glnxa64
$ sudo cp Crack/R2016b/bin/glnxa64/libmwservices.so  /usr/local/MATLAB/R2016b/bin/glnxa64

卸载镜像

$ sudo umount ~/matlab

5. 测试安装是否成功

$ matlab

问题一:
如果没找到命令,解决方法如下

sudo vim /etc/profile

#在文件尾部添加:
export PATH=/usr/local/MATLAB/R2016b/bin:$PATH
#保存并退出并且使得设置生效
source /etc/profile

问题二:
如果显示没有权限打开(打开报错),一般来说找到bin文件下的执行文件,输入sudo bash matlab一般就能打开
或者给MATLAB文件夹以及隐藏文件夹最高权限 /home/XXX/.matlab/
sudo chmod -R 777

问题三:
初次启动 一直卡在启动界面进不去
首先测试一下

$ matlab -nodesktop

如果可以的话,启动matlab后一直卡在splash界面(小窗口)。这个错误的原因是用root运行过matlab,在当前用户目录下留下了一些缓存,而这些缓存再用普通用户无权限访问。

解决方法:删除用户目录下的matlab缓存。

$ sudo rm -r -f ~/.matlab/

6. 建立桌面快捷方式

$ sudo vim /usr/share/applications/Matlab2016b.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Matlab 2016b
Comment=MATLAB
Exec=/usr/local/MATLAB/R2016b/bin/matlab
Icon=/usr/local/MATLAB/R2016b/toolbox/shared/dastudio/resources/MatlabIcon.png
Terminal=true
StartupNotify=true
Type=Application
Categories=Application;
~                           

参考:https://blog.csdn.net/hanlin_tan/article/details/61932134
https://blog.csdn.net/jesse_mx/article/details/53956358
https://blog.csdn.net/minione_2016/article/details/53313271

猜你喜欢

转载自blog.csdn.net/renhaofan/article/details/80960550
今日推荐