我在 python 控制台中运行以下代码
import pygame
pygame.init()
这是终端的输出
libGL error: MESA-LOADER: failed to open iris: /home/souvik/anaconda3/envs/game_env/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /home/souvik/anaconda3/envs/game_env/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /home/souvik/anaconda3/envs/game_env/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri)
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 99
Current serial number in output stream: 100
我刚刚安装了 Manjaro Linux“5.10.42-1-MANJARO”。我猜测 openGL 或其他驱动程序存在一些错误。我想知道如何解决这个问题。
答案1
我也有同样的问题`GLIBCXX_3.4.29' not found
。
- 首先,您应该检查是否可以
GLIBCXX_3.4.29
在 conda lib 中看到:strings ~/miniconda3/lib/libstdc++.so.6 | grep GLIBCXX_3.4.2
- 如果没有,您应该检查它是否存在于您的系统库中:
strings /lib/libstdc++.so.6 | grep GLIBCXX_3.4.2
- 如果这显示了版本,您只需将文件从
/lib
复制到miniconda3/lib
:
还要检查该文件夹在您的环境copy /lib/libstdc++.so.6 ~/miniconda3/lib/
lib
中的位置!miniconda