OpenCV安装失败无法卸载

时间:2017-10-23 15:12:51

标签: opencv makefile uninstall opencv-contrib

在安装opencv_contrib时(在make -j5步骤期间),我的笔记本电脑进入睡眠状态并在安装时出错,导致致命错误。 重试make -j5会再次出现同样的错误。尝试使用make uninstall完全卸载opencv也会因致命错误而完全失败。

如何从这里全新安装OpenCV?

运行make uninstall时出错:

-- Uninstalling "/usr/local/include/opencv2/cvconfig.h"
CMake Error at cmake_uninstall.cmake:20 (MESSAGE):
  Problem when removing "/usr/local/include/opencv2/cvconfig.h"


CMakeFiles/uninstall.dir/build.make:57: recipe for target 
'CMakeFiles/uninstall' failed
make[3]: *** [CMakeFiles/uninstall] Error 1
CMakeFiles/Makefile2:296: recipe for target 
'CMakeFiles/uninstall.dir/all' failed
make[2]: *** [CMakeFiles/uninstall.dir/all] Error 2
CMakeFiles/Makefile2:303: recipe for target             
'CMakeFiles/uninstall.dir/rule' failed
make[1]: *** [CMakeFiles/uninstall.dir/rule] Error 2
Makefile:234: recipe for target 'uninstall' failed
make: *** [uninstall] Error 2

2 个答案:

答案 0 :(得分:1)

您应该尝试make clean并尝试再次卸载。您还应该从之前的opencv安装步骤重新开始

答案 1 :(得分:1)

您无法直接删除usr / local / ...等文件,因此您尝试提供 sudo make uninstall 它会正常工作!