我使用的是Ubuntu 14.04,使用cuda 8.0構建opencv 3.1.0。在ubuntu下使用cuda支持構建opencv 3.1.0的問題
CMake的命令:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -DOPENCV_EXTRA_MODULES_PATH=/home/lindeyang/library/opencv_contrib/modules ..
CMake的配置後,我開始建立,但隨着問題的失敗: 「不足CUDA運行時庫版本,請更新它。」
任何人都可以幫忙嗎?
錯誤:
[ 0%] Built target opencv_cudev
[ 0%] [ 0%] Built target opencv_ts_pch_dephelp
Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
[ 2%] Built target libwebp
[ 2%] Built target opencv_imgproc_pch_dephelp
[ 2%] Built target opencv_imgcodecs_pch_dephelp
[ 2%] Built target opencv_videoio_pch_dephelp
[ 2%] Automoc for target opencv_highgui_pch_dephelp
[ 2%] Automoc for target opencv_highgui
[ 2%] Built target opencv_perf_core_pch_dephelp
[ 2%] Built target opencv_highgui_pch_dephelp_automoc
[ 2%] Built target opencv_highgui_automoc
[ 2%] Built target opencv_test_core_pch_dephelp
Scanning dependencies of target opencv_perf_cudaarithm_pch_dephelp
[ 2%] Scanning dependencies of target opencv_test_cudaarithm_pch_dephelp
Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm_pch_dephelp.dir/opencv_cudaarithm_pch_dephelp.cxx.o
[ 2%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_perf_cudaarithm_pch_dephelp.dir/opencv_perf_cudaarithm_pch_dephelp.cxx.o
[ 2%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_test_cudaarithm_pch_dephelp.dir/opencv_test_cudaarithm_pch_dephelp.cxx.o
In file included from /home/lindeyang/library/opencv/modules/core/src/precomp.hpp:56:0,
from /home/lindeyang/library/opencv/build/modules/core/opencv_core_pch_dephelp.cxx:1:
/home/lindeyang/library/opencv/modules/core/include/opencv2/core/private.cuda.hpp:70:6: error: #error "Insufficient Cuda Runtime library version, please update it."
# error "Insufficient Cuda Runtime library version, please update it."
^
In file included from /home/lindeyang/library/opencv/modules/cudaarithm/src/precomp.hpp:53:0,
from /home/lindeyang/library/opencv/build/modules/cudaarithm/opencv_cudaarithm_pch_dephelp.cxx:1:
/home/lindeyang/library/opencv/modules/core/include/opencv2/core/private.cuda.hpp:70:6: error: #error "Insufficient Cuda Runtime library version, please update it."
# error "Insufficient Cuda Runtime library version, please update it."
^
make[2]: *** [modules/cudaarithm/CMakeFiles/opencv_cudaarithm_pch_dephelp.dir/opencv_cudaarithm_pch_dephelp.cxx.o] Error 1
make[1]: *** [modules/cudaarithm/CMakeFiles/opencv_cudaarithm_pch_dephelp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX static library ../../lib/libopencv_test_cudaarithm_pch_dephelp.a
[ 2%] Built target opencv_test_cudaarithm_pch_dephelp
Linking CXX static library ../../lib/libopencv_perf_cudaarithm_pch_dephelp.a
[ 2%] Built target opencv_perf_cudaarithm_pch_dephelp
make[2]: *** [modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/all] Error 2
make: *** [all] Error 2
圖片附: [結果DEVICEQUERY ][1]
是否有可能安裝了多個版本的CUDA? –
不,我只安裝了cuda 8.0。 –
不,我只安裝了cuda 8.0,我使用的GTX 960M的驅動程序是最新的:375.26 –