本文介绍了如何在 mac 10.6.8 上卸载 openCV?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Mac 上有多个版本的 openCV (2.0,2.1).有没有办法擦除这些多个版本及其所有文件,以便我可以全新安装 openCV 2.3.0

I have multiple versions of openCV (2.0,2.1) on my mac. Is there a way to erase these multiple versions and all its files so that i can make a fresh install of openCV 2.3.0

推荐答案

最明显的命令

sudo port uninstall opencv

可能不起作用,至少在我的情况下它抱怨它需要一个特定的版本.然后我跑

may not work, at least in my case it complained that it needs a particular version. I run then

sudo port uninstall opencv 4.2

在该命令之后,/opt/local/lib 中的所有 opencv 库都消失了.之后我用

All opencv libraries in /opt/local/lib were gone after that command. After that I re-installed openCV with

sudo port install opencv

(如果 ffmpeg 有问题,只需使用 sudo port uninstall ffmpeg 卸载它)

(If there is a problem with ffmpeg just uninstlal it with sudo port uninstall ffmpeg)

顺便说一下,重新安装 opencv 解决了我在从 Mountain Lion 切换到 Maverick (10.9.2) 后遇到的编译和链接问题.特别是,我在 Eclipse 中遇到了链接器问题:

Reinstalling opencv, by the way, fixed my problems with compilation and linking that I had after switching from Mountain Lion to Maverick (10.9.2). In particular, I had a linker problem in Eclipse:

Invoking: GCC C++ Linker
g++ -L/opt/local/lib -o "deltetit"  ./src/deltetit.o   -lopencv_core -lopencv_highgui -lopencv_imgproc
Undefined symbols for architecture x86_64:
  "cv::imshow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cv::_InputArray const&)", referenced from:
      _main in deltetit.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [deltetit] Error 1

这篇关于如何在 mac 10.6.8 上卸载 openCV?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 16:04