Matlab 2014b javax错误与ubuntu中的情节

时间:2015-09-09 06:19:43

标签: java matlab ubuntu plot

我最近在装有Ubuntu 14.04的Packard Bell LJ65笔记本电脑上安装了Matlab 2014b,每次打开它时,命令会弹出以下错误:

javax.media.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for :0
        at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:316)
        at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:295)
        at java.lang.Thread.run(Unknown Source)
    Caused by: javax.media.opengl.GLException: Startup Class Loader-SharedResourceRunner: Error making temp context(1) current: display 0x7f53a421e050, context 0x7f53a4247610, drawable X11OnscreenGLXDrawable[Realized true,
        Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@4c932b8e,
        Handle    0x6800002,
        Surface   WrappedSurface[ displayHandle 0x7f53a421e050
    , surfaceHandle 0x6800002
    , size 64x64
    , UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ]
    , X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7f53a421e050, owner true, ResourceToolkitLock[obj 0x52109ee8, isOwner true, <4130bb6f, 666195d8>[count 2, qsz 0, owner <Startup Class Loader-SharedResourceRunner>]]], idx 0], visualID 0x221, fbConfigID 0xbb,
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]],
        chosen    GLCaps[glx vid 0x221, fbc 0xbb: rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]]
    , surfaceLock <10b4cc6b, 4dd88d5e>[count 1, qsz 0, owner <Startup Class Loader-SharedResourceRunner>]
    , X11DummyUpstreamSurfaceHook[ 64x64]
    , upstreamSurface false ]]
        at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:346)
        at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:662)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:561)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:518)
        at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:292)
        ... 2 more

我以为我可以忽略它,因为程序在大多数任务中都正常运行。但是,在尝试绘图时,会出现以下错误:

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Profile GL_DEFAULT is not available on X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x6860dc76, isOwner false, <2f29fc83, 6d8114a5>[count 0, qsz 0, owner <NULL>]]], but: []
    at javax.media.opengl.GLProfile.get(GLProfile.java:901)
    at javax.media.opengl.GLProfile.getDefault(GLProfile.java:632)
    at javax.media.opengl.GLCapabilities.<init>(GLCapabilities.java:84)
    at com.mathworks.hg.peer.JavaSceneServerPeer.getCaps(JavaSceneServerPeer.java:147)
    at com.mathworks.hg.peer.JavaSceneServerPeer.doCreateCanvas(JavaSceneServerPeer.java:676)
    at com.mathworks.hg.peer.JavaSceneServerPeer.access$200(JavaSceneServerPeer.java:50)
    at com.mathworks.hg.peer.JavaSceneServerPeer$2.run(JavaSceneServerPeer.java:650)
    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)

并且没有产生情节。

我搜索并发现了许多与javax有关的问题但不完全是这个问题。有什么建议吗?

编辑: 从终端加载matlab时出现错误

libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

2 个答案:

答案 0 :(得分:0)

我设法按照http://www.mathworks.com/matlabcentral/answers/170276-matlab2014b-generates-libgl-error-unable-to-load-driver-nouveau_dri-so-at-startup

中的建议自行解决 基本上,首先下载这组驱动程序:

wget ftp://ftp.pbone.net/mirror/elrepo.org/extras/el6/x86_64/RPMS/mesa-dri-drivers-8.0.5-1.el6.elrepo.x86_64.rpm

然后用以下方法解压缩:

rpm2cpio mesa-dri-drivers-8.0.5-1.el6.elrepo.x86_64.rpm | cpio -idmv

(如果未安装rpm2cpio,则sudo get-apt rpm2cpio

并将WhereEverYouUnpacked/usr/lib64/dri/nouveau_dri.so中的文件复制到/usr/lib/dri/

请注意,复制到/usr/必须以root身份完成

答案 1 :(得分:0)

只需使用终端打开matlab,输入./MATLAB_PATH/bin/matlab到终端,你会发现一切都很好。