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/

如果运行命令: sudo mount -o loop R2016b_glnxa64_dvd1.iso /media/matlab/
会出现:mount: /dev/loop1 is write-protected, mounting read-only,但是实际上也是挂载的,自己要去了解以下,原因

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值