在Yosemite Mac上安装OpenCV

时间:2015-05-07 04:05:03

标签: macos opencv homebrew

我正在尝试使用以下方法在Yosemite上安装OpenCV:

brew tap homebrew/science
brew install opencv

它给了我以下错误:

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>'

任何人都可以帮忙解决这个问题吗?

2 个答案:

答案 0 :(得分:3)

更新您的自制程序

brew update

答案 1 :(得分:2)

我建议你安装不同的版本,好像这个版本有Yosemite的错误。

试试这个

brew tap homebrew/science
brew install opencv3

安装后请尝试以下命令

brew doctor 
brew update

如果您无法安装,请查看此链接以获取更多帮助,将帮助您从构建安装。

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