系统:manjaro xfce 64bit

(文末福利)
最好在百度网盘下载,文件太大容易挂掉,下载完成后有3个文件


crack文件里面有密钥、许可证文件和需要替换的文件,和win版本是一样的。

(1)在安装包目录下打开Linux终端,执行下列命令:
$ sudo mkdir /mnt/matlab $ sudo mount -o loop R2018a_glnxa64_dvd1.iso
/mnt/matlab $ cd /mnt/ $ sudo ./mnt/matlab/install
经过上面步骤就能看到安装界面了,默认安装路径在/usr/local/MATLAB/R2018a/ ,

(2)注意,上面只是挂载了第一个安装包,等安装到60%左右的时候会提示插入第二张CD,此时在刚才安装包目录下再次打开一个终端,执行
sudo mount -o loop R2018a_glnxa64_dvd2.iso /mnt/matlab
挂载第二张CD。
(3)安装完成后,将crack里面的R2018a/bin 文件复制替换到安装目录下/usr/local/MATLAB/R2018a/

$ sudo cp -rvf R2018a/bin /usr/local/MATLAB/R2018a/
(4)接下来在/usr/local/MATLAB/R2018a/bin 目录下打开matlab
$ sudo ./matlab
指向许可证文件,激活,等下再次启动MATLAB,之后我自己的就出错了,转达下面部分讨论的内容。

全部安装完matlab2018a之后启动报错,将crash报给了MathWorks
Support,很快回复了,按照里面提供的方法解决了,真是佩服MathWorks的服务(惭愧为了使用simulink使用db,平时数值计算还是用octave或者Python)

(1)首先贴出我的错误代码提示

--------------------------------------------------------------------------------
Segmentation violation detected at 五 3月 30 00:05:20 2018 +0800
--------------------------------------------------------------------------------
Configuration: Crash Decoding : Disabled - No sandbox or build area path Crash
Mode : continue (default) Default Encoding : UTF-8 Deployed : false Desktop
Environment : XFCE GNU C Library : 2.26 stable Java Version : Java
1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed
mode MATLAB Architecture : glnxa64 MATLAB Entitlement ID : 6257193 MATLAB Root
: /usr/local/MATLAB/R2018a MATLAB Version : 9.4.0.813654 (R2018a) Operating
System : "Manjaro Linux" Process ID : 1155 Processor ID : x86 Family 6 Model 69
Stepping 1, GenuineIntel Session Key : 44bbb319-da74-462f-b0e8-79d2dd5ab281
Static TLS mitigation : Disabled: Unnecessary 1 Window System : The X.Org
Foundation (11906000), display :0.0 Fault Count: 1 Abnormal termination
Register State (from fault): RAX = 0000000000000000 RBX = 00007f3007ff7cf0 RCX
= 000000000097b3c0 RDX = 000000000097b3c0 RSP = 00007f30836ed6b8 RBP =
0000000000000002 RSI = 00007fff62861f48 RDI = 0000000000000002 R8 =
00007f30287a2820 R9 = 000000000000002f R10 = 00007f302879c640 R11 =
0000000000000206 R12 = 00007fff62861f48 R13 = 000000000097b3c0 R14 =
00007f3007ff7cf8 R15 = 0000000000000000 RIP = 000000000000b4c0 EFL =
0000000000010246 CS = 0033 FS = 0000 GS = 0000 Stack Trace (from fault): [ 0]
0x000000000000b4c0 <unknown-module>+00000000
原因是
This error occurs when your computer cannot load a certain font display
library through MATLAB.
官方给出的解决办法:


https://cn.mathworks.com/matlabcentral/answers/364727-why-does-matlab-crash-on-linux-fedora-26-with-a-segmentation-violation-r2017b-or-later

<https://cn.mathworks.com/matlabcentral/answers/364727-why-does-matlab-crash-on-linux-fedora-26-with-a-segmentation-violation-r2017b-or-later>

就是下面的方法
# cd /usr/local/MATLAB/R2018b (or wherever you may have installed MATLAB) # cd
bin/glnxa64 # mkdir exclude # mv libfreetype* exclude/
当然,我遇到的情况是这样,网上还有一些说linstdc.so
库和Linux系统自带的版本区别造成的,我也按照方法改成系统的了,但这个不是我遇到的问题解决办法,如果大家遇到了一些crash,发送报给给support也是个不错的选择。

如果想用matlab作为个人学习使用,可以微信扫描下面公众号二维码,关注“向芽塔”,后台回复
“MATLAB”,就可以获取丰富的资源啦(支持WIN,MAC,Linux三大系统)