自制程序-重复的“链接"漏洞.这里的根本问题是什么? [英] Homebrew - repeated "linking" bug. What is the underlying issue here?
问题描述
因此,我一直在使用自制软件在Mac上安装各种程序包/库/程序.我一直遇到一个问题,自酿葡萄酒告诉我我的酒窖中的小桶未连接.
So I've been using homebrew to install various packages/libraries/programs on my mac. I keep running into a problem in which homebrew tells me that I have unlinked kegs in my Cellar.
例如,在运行brew install phantomjs
时,我收到以下消息:
For instance, upon running brew install phantomjs
I received the following message:
Warning: Could not link phantomjs. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link phantomjs'
Possible conflicting files are:
/usr/local/bin/phantomjs -> /usr/local/lib/node_modules/phantomjs/bin/phantomjs
我尝试按照建议的方式运行brew link phantomjs
,并遇到了类似的问题:
I tried running brew link phantomjs
as recommended, and hit a similar problem:
Error: Could not symlink file: /usr/local/Cellar/phantomjs/1.9.2/bin/phantomjs
Target /usr/local/bin/phantomjs already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
命令brew link --overwrite --dry-run phantomjs
给出以下消息:
Would remove:
/usr/local/bin/phantomjs -> /usr/local/lib/node_modules/phantomjs/bin/phantomjs
我可能会继续进行覆盖,但是每次我尝试使用自制软件安装时,似乎都会发生这种情况.为什么?为什么自制软件不能按预期工作?
I will probably go ahead and overwrite, but this appears to happen every time I try to install something with homebrew. Why? Why isn't homebrew working as expected?
谢谢.
推荐答案
据我所知,看起来您以前已经做过:
From what I can tell, looks like you have previously done:
% sudo npm install -g phantomjs
在这种情况下,您应该执行以下操作:
In this case, you should do the following:
% sudo npm uninstall -g phantomjs
% brew link --overwrite phantomjs
这篇关于自制程序-重复的“链接"漏洞.这里的根本问题是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!