ubuntu解决OpenCV安装的问题libGL.so.1和libgthread-2.0.so.0
opencv
OpenCV: 开源计算机视觉库
项目地址:https://gitcode.com/gh_mirrors/opencv31/opencv
·
解决:ImportError: libGL.so.1: cannot open shared object file: No such file or directory
apt update
apt install libgl1-mesa-glx
解决:ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
apt-get install libglib2.0-dev
可能会遇到下面的问题:
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release' does not have a Release file.
或者
E: Unable to locate package libgl1-mesa-glx
这两个个报错是清华源的问题,换用阿里云的就没有了,用vim打开/etc/apt/sources.list这个文件,把里面的东西都删掉,复制阿里云源进去,保存就好了,后边的安装就正常。
vim /etc/apt/sources.list
进入sources.list文件,按两下 d 键,删除一行,直到所有的都删除。然后按一下 i 键,进入编辑模式,把下边的源复制进去,然后按esc键退出编辑模式,按 :wq 保存并退出。
#添加阿里源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
感觉对你有帮助,就点个赞吧>_<
OpenCV: 开源计算机视觉库
最近提交(Master分支:4 个月前 )
1f47f5ba
imgproc: replace assertion in cornerSubPix with descriptive error #28404
Replace CV_Assert with explicit bounds check for initial corners in cornerSubPix.
This provides a descriptive runtime error instead of abrupt termination,
improving error handling for Python and C++ users.
No algorithmic or behavioral change for valid inputs.
Fixes #25139 (Related to #7276).
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
7 小时前
fba658b9
Improve precision of RotatedRect::points 1 天前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)