解决matlab2022a启动提示

linux下安装完matlab2022a后,之后,每次启动都会有:

MESA-LOADER: failed to open iris: /opt/Polyspace/R2022a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open kms_swrast: /opt/Polyspace/R2022a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/kms_swrast_dri.so) (search paths /usr/lib/dri, suffix _dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /opt/Polyspace/R2022a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri, suffix _dri)
failed to load swrast driver

MESA-LOADER: failed to open iris: /usr/local/MATLAB/R2022a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri, suffix _dri)这种错误,大概意思就是libstdc++.so.6版本不对,

后来找到了原因,是系统的版本和matlab的自带的版本不同导致:

sudo ln -sf /usr/lib/libstdc++.so.6.0.30 /usr/local/MATLAB/R2022a/sys/os/glnxa64/libstdc++.so.6

又出现:

com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x64f9713b, isOwner false, <4db91c3c, 390c8b2a>[count 0

是由于英伟达的独显驱动所导致的:

  1. 打开终端

    cd /usr/local/MATLAB/R2022a/bin

  2. ./matlab -softwareopengl

  3.在 MATLAB窗口中运行

  opengl(‘save’,’software’)

  就可以解决了

 

posted @ 2022-10-21 16:12  叕叒双又  阅读(1016)  评论(0编辑  收藏  举报