python-opencv 坑 libopencv_imgproc.so.2.4: cannot open shared object file

19 篇文章 0 订阅

1. libopencv_imgproc.so.2.4: cannot open shared object file 提示找不到

$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libopencv_imgproc.so.2.4: cannot open shared object file: No such file or directory
>>> 
>>> exit()

2.查看安装命令时:

Do you want to continue? [Y/n] y
dpkg: warning: files list file for package 'libopencv-core2.4v5:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-imgproc2.4v5:amd64' missing; assuming package has no files currently installed

有dpkg的告警,以为无所谓,安装后出现1上面的无法使用.

3.解决

sudo aptitude reinstall libopencv-core2.4v5
sudo aptitude reinstall libopencv-imgproc2.4v5

再安装就ok了

 python
Python 2.7.12 (default, Nov 12 2018, 14:36:49) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值