简体   繁体   中英

Installing OpenCV on Yosemite Mac

I am trying to install OpenCV on Yosemite using:

brew tap homebrew/science
brew install opencv

It gives me the following error:

Error: undefined method `deprecated_option' for Opencv:Class
Please report this bug:
    https://github.com/Homebrew/homebrew/wiki/troubleshooting
/usr/local/Library/Taps/homebrew/homebrew-science/opencv.rb:42:in `<class:Opencv>'
/usr/local/Library/Taps/homebrew/homebrew-science/opencv.rb:1:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/Homebrew/formulary.rb:65:in `klass'
/usr/local/Library/Homebrew/formulary.rb:50:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:198:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:27:in `install'
/usr/local/Library/brew.rb:131:in `<main>'

Can anyone help resolve this?

更新您的自制软件

brew update

I would suggest you to install different version, seems like this version has bugs with Yosemite.

Try this

brew tap homebrew/science
brew install opencv3

Once installed try following command

brew doctor 
brew update

And check this link for more help if you cant achieve to install, will help you to install from build.

http://www.learnopencv.com/install-opencv-3-on-yosemite-osx-10-10-x/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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