解决manjaro中的matlab2024a启动问题

前几天升级了系统,manjaro做为滚动发生版本,用起来还是很舒服的。没想到,今天想启动matlab2024a时,出现了提示:
Command `service` threw an exception
Error loading /home/nication/.MathWorks/ServiceHost/-mw_shared_installs/v2025.1.0.2/bin/glnxa64/mathworksservicehost/rcf/matlabconnector/serviceprocess/rcf/service/libmwmshrcfservice.so. libmwfoundation_crash_handling.so: 无法启用共享目标需要的可执行栈: 无效的参数: 成功: 成功

经过查找,在https://wiki.archlinux.org/title/MATLAB找到了问题和解决办法:

executable stack error with MATLAB versions at or before R2024b
The recent release of glibc 2.41 also causes issues with MATLAB. MATLAB will throw an error similiar to the following:

$ bin/matlab
Command `service` threw an exception
Error loading /home/user/.MathWorks/ServiceHost/-mw_shared_installs/$version/bin/glnxa64/mathworksservicehost/rcf/matlabconnector/serviceprocess/rcf/service/libmwmshrcfservice.so. libmwfoundation_crash_handling.so: cannot enable executable stack as shared object requires: Invalid argument: Success: Success

Stricter security settings now require that executable stack permissions are disabled for the libmwfoundation_crash_handling.so shared object file. This can be done with execstackAUR.

$ execstack -c ~/.MathWorks/ServiceHost/-mw_shared_installs/$version/bin/glnxa64/libmwfoundation_crash_handling.so

按照解决问题的办法解决时出现了问题,首先解决没有execstack的问题,

1. 安装软件包:yay -S execstack

2. 找到文件的路径:/home/nication/.MathWorks/ServiceHost/-mw_shared_installs/v2025.1.0.2/bin/glnxa64,其实就是将官方的$version换成自己系统的内容即可,我这里没有办法自动替换,只能手动了

3. execstack -c /home/nication/.MathWorks/ServiceHost/-mw_shared_installs/v2025.1.0.2/bin/glnxa64/libmwfoundation_crash_handling.so 没有任何提示信息就是成功了。

4. 再次启动matlab 没有问题,有同样问题的可以参考下,就是访问栈的方式严格了,出现了警告信息,matlab就这样不厌其烦的检查,影响了matlab自身的运行,大有你不解决就不要用的架势。这样是不是就解决了。

posted @ 2025-02-17 11:01  叕叒双又  阅读(22)  评论(0编辑  收藏  举报