Error installing opencv

(Telin S) #1

hi, I am using macOS Sierra. i need opencv library for a java project, and i have eclipse installed already.

i have typed in the following commands to terminal, and they have successfully terminated:

xcode-select --install
brew tap homebrew/science

but when I typed in:

brew install opencv3 --HEAD --with-contrib --with-java

I have received the following output with an error at the end:

==> Installing opencv3 from homebrew/science
==> Cloning
Updating /Users/TelinS/Library/Caches/Homebrew/opencv3–git
==> Checking out branch master
==> Cloning
Updating /Users/TelinS/Library/Caches/Homebrew/opencv3–contrib–git
==> Checking out branch master
Error: No such file or directory - /private/tmp/opencv3-20170615-11355-bry0kg/3rdparty/ippicv/downloader.cmake

I also tried to install cmake with brew command, but got “Warning: cmake 3.8.2 is already installed”

How can I get rid of that error? many thanks in advance.

(Joshua McKinney) #2

Looks like opencv changed something that broke the homebrew package’s expecations that that particular file exist at 3rdparty/ippicv/downloader.cmake
See for the commit that broke this

Your options are:

  1. Use the default released version of open cv (drop the --HEAD flag). This is the best option unless you’re writing code that requires specifically the git version of the library.
  2. If you need the unreleased version, submit a PR to the formula that fixes the installation instructions.
  3. If you can’t fix this yourself, raise an issue with the bug at and maybe tag the last person to work on the formula (see