Reputation: 55
I can't to get brew to install OpenCV.
Here is the error brew gives me:
brew install opencv
Error: No available formula with the name "opencv"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
I previously installed things like hdf5 and numpy the hard way because brew would not work for me. It would always say it couldn't find formulae. I've tried brew update and brew doctor.
Brew doctor gives this:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3-config
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4-config
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4m-config
/usr/local/CrossPack-AVR/bin/libusb-config
Warning: Your XQuartz (2.7.8_rc1) is outdated
Please install XQuartz 2.7.8:
https://xquartz.macosforge.org
Warning: Python is installed at /Library/Frameworks/Python.framework
Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.
I guess it doesn't like that I installed Python myself. I believe I installed it long before I knew brew existed. I did that years and years ago and have just updated it over and over since then.
So after compiling and installing the dependencies myself, I downloaded OpenCV and Cmake and followed a guide for the Cmake settings here http://blogs.wcode.org/2014/10/howto-install-build-and-use-opencv-macosx-10-10/
Here is the error I get after trying to run make:
Undefined symbols for architecture x86_64:
"_rpl_strerror", referenced from:
testing::internal::GetLastErrnoDescription() in
libopencv_ts.a(ts_gtest.cpp.o)
testing::internal::DeathTestImpl::ReadAndInterpretStatusByte() in
libopencv_ts.a(ts_gtest.cpp.o)
testing::internal::ExecDeathTest::AssumeRole() in
libopencv_ts.a(ts_gtest.cpp.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[2]: *** [bin/opencv_perf_core] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2
The ultimate goal is to install Caffe. I have CUDA installed already. It just needs OpenCV now.
Would it help at this point to nuke all of my Pythons and try getting brew to install them? I'm not confident about brew since it keeps saying it can't find stuff. I might prefer doing my own builds and surely this should be doable. And whatever Cmake fails on seems to be something that shouldn't be related to Python anyway?
Further info about the system: it is running 10.11.9, is definitely an x86_64 architecture, has Xcode and command line tools installed, has two Python versions plus Anaconda, and definitely has an NVIDIA CPU. To sum up, it's a Macbook Pro Retina loaded with dev tools.
Upvotes: 2
Views: 2852
Reputation: 1551
OpenCV is located in homebrew-science.
You can tap homebrew-science
brew tap homebrew/science
and afterwards
brew install opencv
or
brew install opencv3
Or without tap:
brew install homebrew/science/opencv
brew install homebrew/science/opencv3
Upvotes: 15