python-opencvピットlibopencv_imgproc.so.2.4: cannot open shared object file

1341 ワード

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 "", line 1, in 
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
>>>