Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

i'm new to mac os x. i read that homebrew is a good packet manager and i have tried it.

i have also read that to install opencv 2.4 i have to follow those steps:

  • install cmake via homebrew
  • download opencv
  • cmake, sudo make

and i have done it. now i have fully python wrapper in my mac os x. but now if i write brew doctor i have those warnings:

brew doctor
Warning: /usr/local/lib/pkgconfig isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew.

If a brew tries to write a .pc file to this directory, the install will
fail during the link step.

You should probably `chown` /usr/local/lib/pkgconfig
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/libopencv_calib3d.2.4.2.dylib
    /usr/local/lib/libopencv_contrib.2.4.2.dylib
    /usr/local/lib/libopencv_core.2.4.2.dylib
    /usr/local/lib/libopencv_features2d.2.4.2.dylib
    /usr/local/lib/libopencv_flann.2.4.2.dylib
    /usr/local/lib/libopencv_gpu.2.4.2.dylib
    /usr/local/lib/libopencv_highgui.2.4.2.dylib
    /usr/local/lib/libopencv_imgproc.2.4.2.dylib
    /usr/local/lib/libopencv_legacy.2.4.2.dylib
    /usr/local/lib/libopencv_ml.2.4.2.dylib
    /usr/local/lib/libopencv_nonfree.2.4.2.dylib
    /usr/local/lib/libopencv_objdetect.2.4.2.dylib
    /usr/local/lib/libopencv_photo.2.4.2.dylib
    /usr/local/lib/libopencv_stitching.2.4.2.dylib
    /usr/local/lib/libopencv_ts.2.4.2.dylib
    /usr/local/lib/libopencv_video.2.4.2.dylib
    /usr/local/lib/libopencv_videostab.2.4.2.dylib
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/opencv.pc
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

    git

why?? what's wrong? what to do?

share|improve this question
1  
Why didn't you use Homebrew to install OpenCV, instead of building it from source? Homebrew is confused because you bypassed it when you compiled and installed software into the same directories that it manages. –  jmk Feb 2 '13 at 21:26
    
ok, i did it wrong. how can i resolve it now? –  nkint Feb 3 '13 at 14:48

1 Answer 1

up vote 2 down vote accepted

Homebrew's doctor command is very helpful. Since you installed OpenCV from source into the same directories that Homebrew is using, it's complaining about the unexpected files.

To solve the problem, just follow the instructions carefully. Homebrew tells you exactly what you need to do:

  • Make the /usr/local/lib/pkgconfig directory writable.
  • Delete the offending .dylib (/usr/local/lib/libopencv_*.dylib) and .pc files (/usr/local/lib/pkgconfig/opencv.pc).
  • Run brew link git. (Not directly related to OpenCV.)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.