Ubuntu16.04卸载OpenCV3.3.1

  1. 查看已安装的版本
	$ pkg-config --modversion opencv
  1. 找到当初安装opencv的build目录,进入该build目录执行卸载操作
    $  sudo make uninstall
    $  cd  ..
    $  sudo rm -r build
  1. 清理/usr中所有opencv相关项(可能有部分文件夹找不到)
    $  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 /usr
    $  find . -name "*opencv*" | xargs sudo rm -rf
  1. 移除python相关
	$  sudo apt-get remove opencv-doc opencv-data python-opencv

你可能感兴趣的:(OpenCV)