问题
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
回答1:
Check for the following files in the /usr/local
folder:
bin/cjpeg
bin/djpeg
bin/jpegtran
bin/rdjpgcom
bin/wrjpgcom
include/jconfig.h
include/jerror.h
include/jmorecfg.h
include/jpeglib.h
lib/libjpeg.8.dylib
lib/libjpeg.a
share/man/man1/cjpeg.1
share/man/man1/djpeg.1
share/man/man1/jpegtran.1
share/man/man1/rdjpgcom.1
share/man/man1/wrjpgcom.1
For brew link jpeg
to succeed:
- Remove (and backup) any of the aforementioned files
- launch
brew link jpeg
again.
回答2:
Find the file wrjpgcom outside the Cellar and delete it.
The problem is Homebrew is trying to symlink that file into /usr/local but the destination for the symlink already exists as another file.
来源:https://stackoverflow.com/questions/9762943/brew-link-jpeg-issues