ubuntu卸载opencv4
时间: 2023-06-26 11:02:14 浏览: 76
Ubuntu opencv 笔记1
要卸载Ubuntu上的OpenCV 4,您可以按照以下步骤操作:
1. 打开终端并运行以下命令,以确保您的系统是最新的:
sudo apt update
sudo apt upgrade
2. 运行以下命令以卸载OpenCV 4及其所有依赖项:
sudo apt-get remove --autoremove libopencv*
3. 删除OpenCV 4的配置文件和目录:
sudo rm -rf /usr/local/include/opencv4
sudo rm -rf /usr/local/include/opencv2
sudo rm -rf /usr/local/share/opencv4
sudo rm -rf /usr/local/share/opencv2
sudo rm -rf /usr/local/lib/cmake/opencv4
sudo rm -rf /usr/local/lib/cmake/opencv2
sudo rm -rf /usr/local/lib/pkgconfig/opencv4.pc
sudo rm -rf /usr/local/lib/pkgconfig/opencv.pc
sudo rm -rf /usr/local/lib/python3.8/dist-packages/cv2
sudo rm -rf /usr/local/lib/python3.8/dist-packages/opencv_python-4.5.1.48.dist-info
4. 最后,运行以下命令以清理您的系统:
sudo apt-get autoremove
sudo apt-get autoclean
这将完全卸载OpenCV 4及其所有依赖项,并删除其配置文件和目录。
阅读全文