在本机和183上用源码安装opencv 遇到问题:
使用的命令是:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_CUDA=OFF -D WITH_FFMPEG=OFF ..-D BUILD_TIFF=ON -D BUILD_EXAMPLES=OFF -D WITH_JASPER=ON -D CMAKE_INSTALL_PREFIX=/home/geguojing/local -D BUILD_opencv_gpu=OFF -D PYTHON_LIBRARY=/home/geguojing/local/anaconda/bin ..
遇到问题:
No rule to make target '/home/geguojing/local/anaconda/bin', needed by 'lib/cv2.so'. Stop.
make[2]: *** Waiting for unfinished jobs....
[ 99%] Building CXX object modules/python/CMakeFiles/opencv_python.dir/src2/cv2.cpp.o
[ 99%] Built target opencv_test_contrib
[ 99%] Built target opencv_test_ocl
CMakeFiles/Makefile2:5606: recipe for target 'modules/python/CMakeFiles/opencv_python.dir/all' failed
make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
解决方法:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_CUDA=OFF -D WITH_FFMPEG=OFF -D BUILD_TIFF=OFF -D BUILD_EXAMPLES=OFF -D WITH_JASPER=ON -D CMAKE_INSTALL_PREFIX=/home/geguojing/local -D BUILD_opencv_gpu=OFF -D PYTHON_LIBRARY=/home/geguojing/local/anaconda3/bin ..