问题
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
回答1:
The most obvious command
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
All opencv libraries in /opt/local/lib were gone after that command. After that I re-installed openCV with
sudo port install opencv
(If there is a problem with ffmpeg just uninstlal it with sudo port uninstall ffmpeg)
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
回答2:
Just delete the install folder.
And make sure to point to the correct install path when compiling your proj
来源:https://stackoverflow.com/questions/8550906/how-to-uninstall-opencv-on-mac-10-6-8