title: Trying to install opencv using homebrew. ERROR: modules/highgui/CMakeFiles/opencv_highgui.dir/all Error 2
body: <p>I have mac, os x 10.8.3</p>
  
  <p>I used to have macports installed, I deleted it and trying to install opencv using Homebrew.</p>
  
  <p>I installed lame, ffmpeg. Changed $PATH. The error is still the same: </p>
  
  <pre><code>Nellys-MacBook-Pro:~ nellysmitt$ brew install opencv
  ==&gt; Downloading http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/
  Already downloaded: /Library/Caches/Homebrew/opencv-2.4.5.tar.gz
  ==&gt; cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/opencv/2.4.5 -DCMAKE_BUILD_TY
  ==&gt; make
  [ 38%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_tiff.cpp.o
  Linking CXX shared library ../../lib/libopencv_video.dylib
  [ 38%] Built target opencv_video
  make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
  make: *** [all] Error 2
  
  READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
  </code></pre>
  
  <p>Brew doctor was ok before installing ffmpeg. NOw it tells:</p>
  
  <pre><code>Nellys-MacBook-Pro:~ nellysmitt$ brew doctor
  Warning: Unbrewed dylibs were found in /usr/local/lib.
  If you didn't put them there on purpose they could cause problems when
  building Homebrew formulae, and may need to be deleted.
  
  Unexpected dylibs:
      /usr/local/lib/libavcodec.52.108.0.dylib
      /usr/local/lib/libavcore.0.16.1.dylib
      /usr/local/lib/libavdevice.52.2.3.dylib
      /usr/local/lib/libavfilter.1.74.0.dylib
      /usr/local/lib/libavformat.52.93.0.dylib
      /usr/local/lib/libavutil.50.36.0.dylib
      /usr/local/lib/libmp3lame.0.dylib
      /usr/local/lib/libswscale.0.12.0.dylib
  
  Warning: Unbrewed .la files were found in /usr/local/lib.
  If you didn't put them there on purpose they could cause problems when
  building Homebrew formulae, and may need to be deleted.
  
  Unexpected .la files:
      /usr/local/lib/libmp3lame.la
  
  Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
  If you didn't put them there on purpose they could cause problems when
  building Homebrew formulae, and may need to be deleted.
  
  Unexpected .pc files:
      /usr/local/lib/pkgconfig/libavcodec.pc
      /usr/local/lib/pkgconfig/libavcore.pc
      /usr/local/lib/pkgconfig/libavdevice.pc
      /usr/local/lib/pkgconfig/libavfilter.pc
      /usr/local/lib/pkgconfig/libavformat.pc
      /usr/local/lib/pkgconfig/libavutil.pc
      /usr/local/lib/pkgconfig/libswscale.pc
  
  Warning: Unbrewed static libraries were found in /usr/local/lib.
  If you didn't put them there on purpose they could cause problems when
  building Homebrew formulae, and may need to be deleted.
  
  Unexpected static libraries:
      /usr/local/lib/libavcodec.a
      /usr/local/lib/libavcore.a
      /usr/local/lib/libavdevice.a
      /usr/local/lib/libavfilter.a
      /usr/local/lib/libavformat.a
      /usr/local/lib/libavutil.a
      /usr/local/lib/libmp3lame.a
      /usr/local/lib/libswscale.a
  </code></pre>
  
  <p>But the ERROR is the SAME for the last 24 hours. I'm mad and desperate. Don't know how to install this damn OpenCV. </p>