参考:https://blog.csdn.net/loveaborn/article/details/7647734
https://stackoverflow.com/questions/13134151/how-to-uninstall-opencv-in-ubuntu
整理了解决过程中遇到的一些。
问题1:用cmake安装opencv后, 使用opencv出现了unspecified error.也就是调用图形就出错。
------->这是因为安装libgtk2.0-dev要在安装opencv前
问题2: 无法使用cmake卸载opencv,出错显示:
CMake Error at cmake_uninstall.cmake:6 (MESSAGE):Cannot find install manifest:"/home/xxxx/下载/opencv-2.4.5/install_manifest.txt"
-------->这是因为找不到make install之后产生的这个文件install_manifest.txt。可使用语句
cat install_manifest.txt | sudo xargs rm
问题3: cat查找显示依然找不到install_manifest.txt文件。
-------->首先我用以下语句查询了一下,发现还是有opencv。
pkg-config --modversion opencv
然后使用了一下语句手动删除。将usr/local/lib里的库文件全部删除了之后,再用cat查找,发现opencv就已经找不到了。成功卸载。
sudo find / -name "*opencv*" -exec rm -i {} \
问题4:安装libgtk2.0-dev时又出现了依赖项不满足的情况。
-------->这个还是从源来解决会比较好。试了好多方法,最后还是换了清华源才解决。