Arch-Linux

嘗試在我的 conda 環境中執行 pygame,在我新安裝的 Manjaro 上執行並獲取 libGL MESA-LOADER 錯誤

  • July 14, 2021

我在 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或其他東西有一些驅動程序錯誤。我想知道如何解決這個問題。

我有同樣的問題``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
  • 如果這顯示了版本,您可以簡單地將文件從 複製/libminiconda3/libwith:
copy /lib/libstdc++.so.6 ~/miniconda3/lib/

還要檢查lib文件夾在您的miniconda環境中的位置!

引用自:https://unix.stackexchange.com/questions/655495