安装错误修改参考的博客:
1, https://blog.csdn.net/Joker00007/article/details/112338703
3, https://wiki.archlinux.org/index.php/MATLAB#Addon_manager_not_working
遇到的问题:
1.sudo mount -t auto -o loop Matlab98R2020a_Lin64.iso,mount: Matlab98R2020a_Lin64.iso: 无法在 /etc/fstab 中找到,也就是找不到cdrom,找不到光驱
2.运行./install后 Unable to launch the MATLABWindow application
3.运行./MATLABWindow 出现bin/glnxa64/MATLABWindow: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory
4.解决后出现 bin/glnxa64/MATLABWindow: symbol lookup error: /usr/lib/libpango-1.0.so.0: undefined symbol: g_ptr_array_copy
解决方式:
1.iso文件和挂载的目的就是读取iso文件内的文件,既然挂载不了我就把iso文件解压,解压后访问里面的安装程序
2. 2,3条的错误通过第二个参考博客可以解决,也就是selinux没有安装。
3. 4.也就是困扰我时间最长的一部,如果没有出现错误1其原因也就是bin/glnxa64下面的一些本来是链接的解压后变成空文件了,但是如果你手动解压则文件大小无异常
readelf -Ws libpango-1.0.so.0 | grep g_ptr_array_copy
查看g_ptr_array_copy 输出
86: 0000000000000000 0 FUNC GLOBAL DEFAULT UND g_ptr_array_copy
很奇怪,输出结果显示是有这个符号定义的,怎么会输出没有呢?这点我猜测是glnxa64中的某个so文件内容出错了,按照参考网址2的步骤往下做就好了,即重新链接系统库的*.so,*.so.0文件,我写了一段python脚本来实现他的方法。
import os
import sys
from shutil import copyfile
if len(sys.argv)==3:
local_path = sys.argv[1]
sys_path = sys.argv[2]
local_filelist = os.listdir(local_path)
sys_filelist = os.listdir(sys_path)
for f_n in local_filelist:
if ".so" not in f_n or f_n not in sys_filelist:
continue
source = sys_path + "/" + f_n
target = local_path + "/" + f_n
print("The %s file is being processed..." % f_n)
print("Delete the %s source file" % f_n)
cmd_1 = "rm -rf %s" % (target)
print(os.system(cmd_1))
cmd_2 = "ln -s %s %s" % (source, target)
print(os.system(cmd_2))
在命令行执行
python test.py /run/media/xxx/新加卷/Matlab98R2020a_Lin64/cefclient/sys/os/glnxa64/ /usr/lib/
执行后没有异常,可以正常运行。
然后按照网址1的提示进行操作即可成功。