brew link jpeg issues

若如初见. 提交于 2019-12-23 17:01:43

问题


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 jpegto succeed:

  1. Remove (and backup) any of the aforementioned files
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!