How to symlink file using homebrew and how to delete a file

好久不见. 提交于 2019-12-11 11:57:14

问题


I installed PIL and then I installed libjpeg and I get the following errors:

    jpeg8-d is already installed, it's just not linked
    Could not symlink file: /usr/local/Cellar/jpeg/8d/bin/wrjpgcom
    Target /usr/local/bin/wrjpgcom already exists. You may need to delete it.
    To force the link and delete this file, do:
    brew link --overwrite formula_name

回答1:


Both the problem and the solution are completely described by the error message you posted. What part of it do you not understand?

Could not symlink file: /usr/local/Cellar/jpeg/8d/bin/wrjpgcom
Target /usr/local/bin/wrjpgcom already exists.

This is telling you that, for some reason, you've got already got a /usr/local/bin/wrjpgcom from somewhere besides Homebrew, and Homebrew doesn't want to mess with it, in case you had a good reason for it.

To force the link and delete this file, do:
brew link --overwrite formula_name

If you have no idea where that file came from, don't care, and just want it to be blasted, just do brew link --overwrite jpeg8-d.

You probably also want to run brew doctor to have it look for other problems in your setup that you should fix.



来源:https://stackoverflow.com/questions/13371561/how-to-symlink-file-using-homebrew-and-how-to-delete-a-file

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