Homebrew - 重复 "linking"错误。这里的根本问题是什么?

标签 homebrew

所以我一直在使用 Homebrew 软件在我的 mac 上安装各种包/库/程序。我一直遇到一个问题, Homebrew 软件告诉我我的酒窖中的小桶没有链接。

例如,在运行 brew install phantomjs 时我收到以下消息:

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按照建议,并遇到类似的问题:
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

我可能会继续进行覆盖,但是每次我尝试使用 Homebrew 软件安装某些东西时似乎都会发生这种情况。为什么?为什么 Homebrew 软件没有按预期工作?

谢谢。

最佳答案

据我所知,看起来你以前做过:

% sudo npm install -g phantomjs

在这种情况下,您应该执行以下操作:
% sudo npm uninstall -g phantomjs
% brew link --overwrite phantomjs

关于Homebrew - 重复 "linking"错误。这里的根本问题是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19572764/

相关文章:

git - Homebrew 软件致命 : needed a single revision (MacOs Sierra)

macos - 告诉 Homebrew 软件永远不要从源代码构建

opencv - 使用 homebrew 安装 opencv 3.3.1(之前的版本)

ruby-on-rails - 未找到 Ruby Bundle 符号 : _SSLv2_client_method (LoadError)

c++ - 使用 brew 安装 boost 时缺少 boost_signals 库

python - 库未加载 :/usr/local/opt/mysql/lib/libmysqlclient. 21.dylib 和原因图像未找到

pip - 无法在 mac high sierra 上卸载 awscli

ffmpeg - 如何使用 vo-amrwbenc 库构建 ffmpeg?

c - OSX + homebrew + CMake + libpng 版本不匹配问题

macos - 如何使用 Homebrew 软件构建带有调试符号的库?