我正在遵循OpenCV 文档并出现了一些失败。我按照步骤 2 并运行./opencv.sh
,但结果
//home/voo-doo/anaconda2/lib/libQtGui.so.4: undefined reference to `png_get_channels@PNG16_0'
collect2: error: ld returned 1 exit status
samples/cpp/CMakeFiles/cpp-tutorial-pnp_detection.dir/build.make:319:
recipe for target 'bin/cpp-tutorial-pnp_detection' failed
make[2]: *** [bin/cpp-tutorial-pnp_detection] Error 1
CMakeFiles/Makefile2:7367: recipe for target 'samples/cpp/CMakeFiles/cpp-tutorial-pnp_detection.dir/all' failed
make[1]: *** [samples/cpp/CMakeFiles/cpp-tutorial-pnp_detection.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 73%] Linking CXX executable ../../bin/cpp-example-videocapture_starter
[ 73%] Built target example_videocapture_starter
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
[sudo] password for voo-doo:
sudo: checkinstall: command not found
OpenCV 3.2.0 ready to be used
voo-doo@voodoo-HP-envy:~$ python
Python 2.7.11 |Anaconda 2.5.0 (64-bit)| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> from cv2.cv import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2.cv
我无法从该文档中找到任何解决方案。
总的来说,我只需要安装openCV并通过python环境使用它。
问题:我该如何解决这个问题?