linux服务器运行matlab文件报错

linux服务器运行matlab文件报错

在linux服务器上安装matlab之后,如果想要运行matlab程序,通常的做法是先cd到matlab文件所在的文件夹,然后输入指令

% 假定matlab文件名为XXX.m,需要注意的是下面这条指令是写XXX,不要加上后缀名.m
matlab -nodesktop -nosplash -r XXX

问题描述

有时候可能会遇到这样的报错信息:

Internal Error: No write permission on directory matlab_path. Details: fl:filesystem:AccessDenied.
        at com.mathworks.mlwidgets.prefs.InitialWorkingFolder.setStringSettingValue(InitialWorkingFolder.java:52)
        at com.mathworks.mlwidgets.prefs.InitialWorkingFolder.access$000(InitialWorkingFolder.java:15)
        at com.mathworks.mlwidgets.prefs.InitialWorkingFolder$1.actionPerformed(InitialWorkingFolder.java:34)
        at com.mathworks.jmi.MatlabPath$DeferredActionEvent.dispatch(MatlabPath.java:152)
        at com.mathworks.util.QueueEvent$QueueTarget.processEvent(QueueEvent.java:89)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

解决方案

这个链接给出了可行的解决方案。
Step1 转到/usr/local/MATLAB/R2019a/bin/文件夹(输入matlab的安装路径)
Step2 将.matlab7rc.sh的权限设置为最高权限

sudo chmod 777 .matlab7rc.sh

Step3 将含有’‘LDPATH_PREFIX=’ M A T L A B / s y s / o p e n g l / l i b MATLAB/sys/opengl/lib MATLAB/sys/opengl/lib/ARCH’'的三行位置取消注释
重新运行matlab文件即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值