简体   繁体   English

Unistall opencv 2.4.9并安装3.0.0

[英]Unistall opencv 2.4.9 and install 3.0.0

Im using openCV on Ubuntu 14.04, but some of the functions that I require particularly in cv2 library (cv2.drawMatches, cv2.drawMatchesKnn) does not work in 2.4.9. 我在Ubuntu 14.04上使用openCV,但我在cv2库中特别需要的一些功能(cv2.drawMatches,cv2.drawMatchesKnn)在2.4.9中不起作用。 How do I uninstall 2.4.9 and install 3.0.0 from the their git? 如何卸载2.4.9并从他们的git安装3.0.0? I know the procedure for installing 3.0.0 but how do I make sure that 2.4.9 get completely removed from disk? 我知道安装3.0.0的过程但是如何确保2.4.9完全从磁盘中删除?

The procedure depends on whether or not you built OpenCV from source with CMake, or snatched it from a repository. 该过程取决于您是否使用CMake从源构建OpenCV,或者是否从存储库中获取了OpenCV。

From repository 从存储库

sudo apt-get purge libopencv* will cleanly remove all traces. sudo apt-get purge libopencv*将干净地删除所有痕迹。 Substitute libopencv* as appropriate in case you were using an unofficial ppa. 如果您使用的是非正式的ppa,请适当替换libopencv*

From source 从来源

If you still have the files generated by CMake (the directory from where you executed sudo make install ), cd there and sudo make uninstall . 如果您仍然拥有由CMake生成的文件(您执行sudo make install的目录),请在那里cdsudo make uninstall Otherwise, you can either rebuild them with the exact same configuration and use the above command, or recall your CMAKE_INSTALL_PREFIX ( /usr/local by default), and remove everything with opencv in its name within that directory tree. 否则,您可以使用完全相同的配置重建它们并使用上面的命令,或者重新调用您的CMAKE_INSTALL_PREFIX (默认情况下为/usr/local ),并在该目录树中删除其名称中的opencv

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM