ubuntu2204-cuda10.2-cudnn870-ZED2 SDK-libGL报错

复制代码
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (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: cannot open shared object file: No such file or directory (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: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
freeglut (foo):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow```

解决办法:
```bash
cd /usr/lib
$ mkdir dri
sudo cp /usr/lib/x86_64-linux-gnu/dri/iris_dri.so ./
sudo cp /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so ./

然后新的报错:

bash 复制代码
libGL error: MESA-LOADER: failed to open iris: /home/oscar/anaconda3/envs/ZED/bin/../lib/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/oscar/anaconda3/envs/ZED/bin/../lib/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/oscar/anaconda3/envs/ZED/bin/../lib/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
freeglut (foo):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

解决办法:

bash 复制代码
先查看是否支到 GLIBCXX_3.4.30
strings /home/oscar/anaconda3/lib/libstdc++.so.6 | grep GLIBCXX
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/f6abbfaa61c84ae48569b7488bd8106d.jpeg)

若否:
conda install libstdcxx-ng=12.1.0 --channel conda-forge
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/251bbff9a688495f92ca2511c1ed6213.jpeg)

cd anaconda3/envs/ZED/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.30

然后新的报错:

bash 复制代码
freeglut (foo):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

解决办法:

bash 复制代码
glxinfo | grep OpenGL 
查看信息发现OpenGL 没有默认nvidia 显卡
然后需要切换到NVIDIA显卡
sudo prime-select nvidia
然后需要重启

最后默认安装的cudnn860会报错

需要重新下载cudnn870才行

官网下载:cudnn-linux-x86_64-8.7.0.84_cuda10-archive

复制代码
安装cudnn870
sudo cp include/cudnn*.h /usr/local/cuda/include/
sudo cp lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
相关推荐
陈天伟教授3 小时前
人工智能训练师认证教程(2)Python os入门教程
前端·数据库·python
Elastic 中国社区官方博客4 小时前
Elasticsearch:在分析过程中对数字进行标准化
大数据·数据库·elasticsearch·搜索引擎·全文检索
聪明努力的积极向上4 小时前
【MYSQL】字符串拼接和参数化sql语句区别
数据库·sql·mysql
代码or搬砖4 小时前
RBAC(权限认证)小例子
java·数据库·spring boot
神仙别闹4 小时前
基于QT(C++)实现学本科教务系统(URP系统)
数据库·c++·qt
2301_768350234 小时前
MySQL为什么选择InnoDB作为存储引擎
java·数据库·mysql
上海蓝色星球4 小时前
迈向智慧电网新纪元:上海蓝色星球数字孪生变电主子站系统
运维·数据库
是大芒果4 小时前
数据库表设计
数据库
哥哥还在IT中4 小时前
MySQL order by 如何优化
数据库·mysql
积跬步,慕至千里5 小时前
postgre数据库大批量快速导出方法总结
数据库·postgres