环境:

  • Ubuntu16.04
  • Matlab R2018a
Matlab R2018a 百度网盘 - 密码:dqng

安装包下载

百度网盘下载 Matlab R2018a 后,会得到三个文件:

  • R2018a_glnxa64_dvd1.iso
  • R2018a_glnxa64_dvd2.iso
  • Matlab 2018a Linux64 Crack.tar.gz - 破解文件.

由于整个软件太大(12.8G),所以分成了两个iso文件,安装过程中会提示载入新的映像文件.

挂载镜像

假设新建挂载目录为:/home/ai/matlab

sudo mount -t auto -o loop /path/to/R2018a_glnxa64_dvd1.iso /home/ai/matlab/

安装Matlab

ISO 镜像挂载后,自动打开挂载目录 /home/ai/matlab,即可进行安装.

cd /home/ai/
sudo ./matlab/install

根据提示进行安装.

两种安装模式:

1) 离线安装:
- 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 copy license_standalone.lic to %installdir%licenses ,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

大概 62% 的时候会弹出一个提示框,提示插入dvd2,这时候重新开一个终端,把 dvd2 挂载到 /home/ai/matlab/ 目录:

sudo mount -t auto -o loop /path/to/R2018a_glnxa64_dvd2.iso /home/ai/matlab/

挂载 dvd2 后,点击话框中 OK ,继续安装.
完成安装后取消 ISO 挂载.

cd /home/ai/
sudo umount matlab/
sudo umount matlab/ # 挂载了两次,需要执行两次取消挂载.
sudo rm -rf matlab/

激活Matlab:

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

根据提示,首先加载激活文件 license_standalone.lic(Matlab 2018a Linux64 Crack.tar.gz 解压后):

加载完成后,再把把Crack 目录中的 Matlab 2018a Linux64 Crack/R2018a/bin
/glnxa64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.so
文件复制到 /usr/local/MATLAB/R2016b/bin/glnxa64/matlab_startup_plugins/lmgrimpl/目录下:

sudo cp /path/to/Matlab 2018a Linux64 Crack/R2018a/bin/glnxa64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.so /usr/local/MATLAB/R2018/bin/glnxa64/matlab_startup_plugins/lmgrimpl/

建立软连接,创建快捷方式:

sudo ln -s /usr/local/MATLAB/R2018a/bin/matlab /usr/bin/matlab
sudo ldconfig

sudo apt-get install matlab-support

安装完成.

<h2>遇到问题解决</h2>

  1. 命令行启动 matlab 时,出现错误:libstdc++.so.6: version `GLIBCXX3.4.22' not found. 这是因为当前版本的libstdc++.so.6缺少GLIBCXX_3.4.22.查看当前版本的GLIBCXX命令为,
    strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
    

    解决方案:

    sudo apt-get install libstdc++6
    
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    
    strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
    

    <p>From libstdc++.so.6: version `GLIBCXX3.4.22' not found</p></li>

Last modification:October 9th, 2018 at 09:31 am