我想在Ubuntu 14.04上安裝OpenCV 3.0 for Python,但是在許多安裝(以及StackOverflow頁面讀取)後,它仍然無法工作。無法安裝OpenCV Ubuntu(libopencv_core錯誤)
在Python(Python 2.7版)導入打字import cv2
,當我得到這個錯誤:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libopencv_core.so.2.4: cannot open shared object file: No such file or directory
我已經看到了這個錯誤可能是由於該文件/etc/ld.so.conf.d/opencv.conf
,所以我裏面寫了一行/usr/local/opencv/
但它沒有幫助(實際上不存在的文件夾opencv
在/usr/local/
我的電腦上...
對於安裝我跟着這個網站上的說明:http://milq.github.io/install-opencv-ubuntu-debian/
我懷疑在cmake
階段發生了錯誤,因爲我得到了像-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
這樣的失敗。我不知道這意味着什麼,如果它是安裝的重要...
我有一個像
-- checking for module 'gstreamer-base-1.0'
-- package 'gstreamer-base-1.0' not found
其他錯誤,在我得到這個錯誤的make
階段
[ 31%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/qrc_window_QT.cpp.o
In file included from /home/xavier/OpenCV/build/modules/highgui/qrc_window_QT.cpp:9:0:
/home/xavier/OpenCV/build/modules/highgui/qrc_window_QT.cpp: In function ‘int qInitResources_window_QT()’:
/home/xavier/OpenCV/build/modules/highgui/qrc_window_QT.cpp:1749:25: warning: no previous declaration for ‘int qInitResources_window_QT()’ [-Wmissing-declarations]
int QT_MANGLE_NAMESPACE(qInitResources_window_QT)()
^
/usr/include/qt5/QtCore/qglobal.h:100:36: note: in definition of macro ‘QT_MANGLE_NAMESPACE’
# define QT_MANGLE_NAMESPACE(name) name
^
/home/xavier/OpenCV/build/modules/highgui/qrc_window_QT.cpp: In function ‘int qCleanupResources_window_QT()’:
/home/xavier/OpenCV/build/modules/highgui/qrc_window_QT.cpp:1758:25: warning: no previous declaration for ‘int qCleanupResources_window_QT()’ [-Wmissing-declarations]
int QT_MANGLE_NAMESPACE(qCleanupResources_window_QT)()
^
/usr/include/qt5/QtCore/qglobal.h:100:36: note: in definition of macro ‘QT_MANGLE_NAMESPACE’
# define QT_MANGLE_NAMESPACE(name) name
^
[ 31%] Generating opencl_kernels_superres.cpp, opencl_kernels_superres.hpp
你知道什麼是錯的嗎?
看來你已經安裝了一箇舊的OpenCV版本(2.4.something),與3.0衝突 – Miki
是的,可能是這樣,但我試圖在安裝3.0版本之前刪除opencv(使用'sudo find/-name * opencv *「-exec rm -i {} \;''sudo make unistall')。但也許它不起作用。我需要做什麼? – fonfonx
不知道在linux上; D。我只是給你一些可能的問題的指針。 – Miki