【anaconda】解决libGL error问题:MESA-LOADER: failed to open iris、MESA-LOADER: failed to open swrast....
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: 无法打开共享目标文件: 没有那个文件或目录libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: 无法打开共享目标文件: 没有那个文件或目录
·
【anaconda】解决libGL error问题:MESA-LOADER: failed to open iris、MESA-LOADER: failed to open swrast、failed to load driver: iris、failed to load driver: swrast
背景
学习A*算法时,执行https://blog.csdn.net/acanab/article/details/132479023中的python代码,出现错误:
执行环境及执行步骤
conda create -n nav python=3.10.12
conda activate nav
conda install matplotlib
python A_star.py
第一阶段报错及解决
报错信息
(nav) lifang12@lifang12:~/03_programming/nav2_learning$ python a_star.py
/home/lifang12/03_programming/nav2_learning/a_star.py start!!
min_x: -10
min_y: -10
max_x: 60
max_y: 60
x_width: 35
y_width: 35
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: 无法打开共享目标文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: 无法打开共享目标文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: 无法打开共享目标文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Find goal
解决办法
将/lib/x86_64-linux-gnu/dri/
中的iris_dri.so
、swrast_dri.so
复制到/usr/lib/dri
下,如果没有/usr/lib/dri
路径,创建
mkdir -p /usr/lib/dri
sudo cp /lib/x86_64-linux-gnu/dri/iris_dri.so /usr/lib/dri
sudo cp /lib/x86_64-linux-gnu/dri/swrast_dri.so /usr/lib/dri
第二阶段报错及解决
报错信息
(nav) lifang12@lifang12:~/03_programming/nav2_learning$ python a_star.py
/home/lifang12/03_programming/nav2_learning/a_star.py start!!
min_x: -10
min_y: -10
max_x: 60
max_y: 60
x_width: 35
y_width: 35
libGL error: MESA-LOADER: failed to open iris: /home/lifang/miniconda3/envs/nav/lib/python3.10/site-packages/PIL/../../../././libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-15.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /home/lifang/miniconda3/envs/nav/lib/python3.10/site-packages/PIL/../../../././libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-15.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /home/lifang/miniconda3/envs/nav/lib/python3.10/site-packages/PIL/../../../././libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-15.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Find goal
解决办法
cite :https://blog.csdn.net/quintus0505/article/details/130758022
执行命令:
# 注意是改对应的环境,我这里是nav环境
/home/用户名/miniconda3/envs/nav/lib
mkdir backup
mv libstd* backup
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./
ln -s libstdc++.so.6 libstdc++.so
ln -s libstdc++.so.6 libstdc++.so.6.0.19
# 注意libstdc++.so.6.0.19的后面不一定是19,得看原来是什么,就是什么,比如我是libstdc++.so.6.0.29
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献1条内容
所有评论(0)