无法安装opencv

时间:2016-11-22 22:04:23

标签: python c++ opencv homebrew

我正在尝试安装opencv。我按照这里的步骤http://www.mobileway.net/2015/02/14/install-opencv-for-python-on-mac-os-x/

除非我尝试按

安装opencv,否则一切顺利
$ brew install opencv

错误消息显示:

==> Installing opencv from homebrew/science
==> Installing dependencies for homebrew/science/opencv: mpfr, libmpc, isl, gcc, sphinx-doc, cmake, eigen, jpeg, libpng, libtiff, ilmbase, openexr, homebrew/python/numpy
==> Installing homebrew/science/opencv dependency: mpfr
==> Using the sandbox
Error: mpfr cannot be built with any available compilers.
Install GNU's GCC
brew install gcc

更新 当我尝试更多并通过brew install gcc安装gcc时,我有这个错误:

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

Error: Could not link:
/usr/local/etc/bash_completion.d/brew

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/doc/homebrew

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/zsh/site-functions/_brew

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/man/man1/brew.1

Please delete these paths and run `brew update`.
==> Installing dependencies for gcc: mpfr, libmpc, isl
==> Installing gcc dependency: mpfr
==> Using the sandbox
Error: mpfr cannot be built with any available compilers.
Install GNU's GCC
brew install gcc

当我删除所有上述路径并运行brew updatebrew install gcc时,我仍然遇到同样的错误:

==> Installing dependencies for gcc: mpfr, libmpc, isl
==> Installing gcc dependency: mpfr
==> Using the sandbox
Error: mpfr cannot be built with any available compilers.
Install GNU's GCC
brew install gcc

有人可以帮我识别问题以及如何解决问题吗?谢谢!

0 个答案:

没有答案