Manjaro 安装 Matlab 遇到的问题

安装错误修改参考的博客:

1, https://blog.csdn.net/Joker00007/article/details/112338703

2, https://helywin.github.io/2020/11/01/Matlab2020a%E5%9C%A8%E6%9C%80%E6%96%B0Linux%E4%B8%8B%E5%AE%89%E8%A3%85%E6%8A%A5%E9%94%99/

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的提示进行操作即可成功。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值