Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install opencv on Mac OSX Lion.

brew install opencv

I get the following error (and a few other similar ones)

Error: The linking step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link jpeg'

When I do

brew link jpeg
Linking /usr/local/Cellar/jpeg/8d... ln: wrjpgcom: File exists

I do not understand what this means? What should I be doing? Thanks

share|improve this question

1 Answer 1

This doesn't actually have anything to do with opencv: it's just the jpeg dependency.

ln was asked to create a hard link (which should be /usr/local/Cellar/jpeg/8d/bin/wrjpgcom -> /usr/local/bin/wrjpgcom) but there is already a file at that location.

This doesn't normally happen so I suspect you might have some detritus left behind from a previous recipe version. I would start by getting your brew install closer to the main public version:

brew update
brew uninstall jpeg
brew cleanup

At this point neither /usr/local/Cellar/jpeg nor /usr/local/bin/wrjpgcom should exist. After verifying that's the case, I'd try repeating the process:

brew install jpeg 

If that works, you should be clear to continue installing 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.