Ubuntu16.04 上openCV的卸载

首先进入有安装路径配置文件install_manifest.txt(是关于opencv配置的路径),我的是在home目录下的opencv:

cd /home/hy/opencv/build
make uninstall//卸载掉配置路径中的文件
sudo rm -r build//删除build文件
//删除掉环境中有关的其余包
sudo rm -r /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*

cd /home/hy
chmod a+x opencv//给opencv权限
rm -r opencv//如果删除还是有文件权限不够,可以继续给相应文件权限,chomd a+x 文件名

使用此方法,本人成功卸载掉安装错误的opencv

你可能感兴趣的:(Linux)