我在 ubuntu 16.04 LTS 上使用 matlab 2014b。在 matlab 上添加路径并尝试运行脚本时遇到了一些问题。它显示:
java.lang.UnsatisfiedLinkError: no nativeservices in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.mathworks.services.Prefs.<clinit>(Prefs.java:152)
at com.mathworks.fatalexit.FatalExitFrame.<init>(FatalExitFrame.java:138)
at com.mathworks.fatalexit.FatalExitFrame$13.run(FatalExitFrame.java:775)
at java.awt.event.InvocationEvent.dispatch(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.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)
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: com.mathworks.services.Prefs.nativeGetPreferencesDirectory()Ljava/lang/String;
at com.mathworks.services.Prefs.nativeGetPreferencesDirectory(Native Method)
at com.mathworks.services.Prefs.getPropertyDirectory(Prefs.java:184)
at com.mathworks.services.Prefs.load(Prefs.java:240)
at com.mathworks.services.Prefs.<clinit>(Prefs.java:160)
at com.mathworks.fatalexit.FatalExitFrame.<init>(FatalExitFrame.java:138)
at com.mathworks.fatalexit.FatalExitFrame$13.run(FatalExitFrame.java:775)
at java.awt.event.InvocationEvent.dispatch(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.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)
从我从其他帖子中看到的情况来看,java 无法找到 java.library.path 或者尚未指定它。
我怎样才能解决这个问题?
感谢您的帮助。
答案1
apt-get install matlab-support
并按照说明操作。这就足够了。