make[2]: *** [modules/world/CMakeFiles/opencv_world.dir/build.make:1264:modules/world/CMakeFiles/cuda_compile_1.dir/__/core/src/cuda/cuda_compile_1_generated_gpu_mat_nd.cu.o] 错误 1
时间: 2023-08-12 17:05:51 浏览: 386
引用\[1\]:make\[2\]: *** \[modules/gapi/CMakeFiles/opencv_gapi.dir/build.make:869: modules/gapi/CMakeFiles/opencv_gapi.dir/src/backends/ie/giebackend.cpp.o\] Error 1 。 引用\[2\]:modules/cudev/test/CMakeFiles/opencv_test_cudev.dir/build.make:5549: recipe for target 'bin/opencv_test_cudev' failed make\[2\]: *** \[bin/opencv_test_cudev\] Error 1CMakeFiles/Makefile2:1264: recipe for target 'modules/cudev/test/CMakeFiles/opencv_test_cudev.dir/all' failedmake\[1\]: *** \[modules/cudev/test/CMakeFiles/opencv_test_cudev.dir/all\] Error 2Makefile:160: recipe for target 'all' failedmake: *** \[all\] Error 2 。 引用\[3\]:错误:make\[2\]: *** \[modules/python3/CMakeFiles/opencv_python3.dir/build.make:56: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o\] Error 1 make\[1\]: *** \[CMakeFiles/Makefile2:21149: modules/python3/CMakeFiles/opencv_python3.dir/all\] Error 2 make: *** \[Makefile:138: all\] Error 2 网上解决方案零零碎碎,几个小时了都没有解决,直到深挖了某个大佬的博客空间,发现了这个文章:树莓派交叉编译opencv3.4.1/pycharm安装opencv/实现人脸识别Demo记录 找到cv2.cpp那个文件 texteditor打开,翻到885行(可能每个人的不一样,就在这附近) 前面要加上个(char *)。 然后再编译,在这个地方停很长时间就可以通过了。 安装完成后简直热泪盈眶!!! 但愿后面再安装opencv的人能快点解决这个鬼东西。。
问题:make\[2\]: *** \[modules/world/CMakeFiles/opencv_world.dir/build.make:1264:modules/world/CMakeFiles/cuda_compile_1.dir/__/core/src/cuda/cuda_compile_1_generated_gpu_mat_nd.cu.o\] 错误 1
回答: 这个错误是在编译opencv时出现的。根据引用\[1\]、\[2\]和\[3\]的信息,这个错误可能是由于编译过程中的某些问题导致的。解决这个问题的方法可能因个人情况而异,但有人在解决类似问题时在cv2.cpp文件的885行前面添加了(char *),然后重新编译,最终成功通过了编译。你可以尝试这个方法来解决你遇到的问题。希望这个解决方案对你有帮助!
#### 引用[.reference_title]
- *1* [make[2]: *** [modules/gapi/CMakeFiles/opencv_gapi.dir/build.make:869: modules/gapi/CMakeFiles/opencv](https://blog.csdn.net/AcetylcholineACh/article/details/129970610)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [安装opencv3.2.0 cmake出现 CMakeFiles/Makefile2:1264: recipe for target 'modules/cudev/test/...](https://blog.csdn.net/qq_33202928/article/details/80079485)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [树莓派安装opencv报错:make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:56...](https://blog.csdn.net/qq_44357371/article/details/105966714)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]