MATLAB 的 libGL 错误

MATLAB 的 libGL 错误

当我从终端调用 matlab 时

libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

我的 libgl 驱动程序

-rw-r--r-- 1 root root 459392 Ago 11 19:49 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
lrwxrwxrwx 1 root root 14 Ago 11 19:49 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2.0
lrwxrwxrwx 1 root root 19 Out 25 16:43 /usr/local/MATLAB/MATLAB_Production_Server/R2015a/sys/opengl/lib/glnxa64/libGL.so.1 -> libGL.so.1.5.070200
-r-xr-xr-x 1 root root 3200281 Dez 29  2014 /usr/local/MATLAB/MATLAB_Production_Server/R2015a/sys/opengl/lib/glnxa64/libGL.so.1.5.070200

我的显卡

 lspci -vnn | grep VGA -A 12
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM] [1002:6779] (prog-if 00 [VGA controller])
    Subsystem: Hightech Information System Ltd. Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM] [1787:2311]
    Flags: bus master, fast devsel, latency 0, IRQ 42
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at d0100000 (64-bit, non-prefetchable) [size=128K]
    I/O ports at 1000 [size=256]
    Expansion ROM at d0140000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: radeon
    Kernel modules: radeon

03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series] [1002:aa98]
    Subsystem: Hightech Information System Ltd. Caicos HDMI Audio [Radeon HD 6400 Series] [1787:aa98]

我可以找到图书馆

milenko@milenko-desktop:~$ locate r600_dri.so
/usr/lib/x86_64-linux-gnu/dri/r600_dri.so

我已经建立了符号链接

 sudo ln -sf /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 /usr/local/MATLAB/MATLAB_Production_Server/R2015a/sys/opengl/lib/glnxa64/libGL.so.1.5.070200

libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
libGL: dlopen /usr/lib/x86_64-linux-gnu/dri/r600_dri.so failed (/usr/local/MATLAB/MATLAB_Production_Server/R2015a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/dri/r600_dri.so))
libGL: OpenDriver: trying ${ORIGIN}/dri/tls/r600_dri.so
libGL: OpenDriver: trying ${ORIGIN}/dri/r600_dri.so
libGL: dlopen ${ORIGIN}/dri/r600_dri.so failed (${ORIGIN}/dri/r600_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so
libGL: dlopen /usr/lib/dri/r600_dri.so failed (/usr/lib/dri/r600_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600

我应该尝试什么?我在使用 Ubuntu 16.04。

答案1

问题显然是由于驱动程序安装在两个文件夹中。我发现一个解决方案在官方 MATLAB 论坛上。

我通过重命名驱动程序文件解决了该问题:

cd MATLAB_ROOT/sys/os/glnxa64/
sudo mv libstdc++.so.6 libstdc++.so.6.old

答案2

您可以尝试以下命令来创建符号链接。

ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/MATLAB/XXXXX(R2014b)/sys/os/glnxa64/libstdc++.so.6

答案3

我通过重命名驱动程序文件解决了该问题。

cd MATLAB/sys/os/glnxa64/
sudo mv libstdc++.so.6 libstdc++.so.6.old

相关内容