当前位置: 首页 > 面试题库 >

错误:“ brew link”步骤未成功完成

弓嘉纳
2023-03-14
问题内容

我正在尝试通过Homebrew安装node.js。不幸的是,我得到这个错误:

➜  ~  brew install node
==> Downloading http://nodejs.org/dist/v0.8.10/node-v0.8.10.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/node/0.8.10
==> make install
==> Caveats
Homebrew installed npm.
We recommend prepending the following path to your PATH environment
variable to have npm-installed binaries picked up:
  /usr/local/share/npm/bin
Warning: Could not link node. 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 node'
==> Summary
/usr/local/Cellar/node/0.8.10: 856 files, 13M, built in 103 seconds

因此,我尝试手动链接节点…

➜  ~  brew link node
Linking /usr/local/Cellar/node/0.8.10... Warning: Could not link node. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/node/0.8.10/lib/node_modules/npm/scripts/relocate.sh
Target /usr/local/lib/node_modules/npm/scripts/relocate.sh already exists. You may need to delete it.
To force the link and delete this file, do:
  brew link -f formula_name

To list all files that would be deleted:
  brew link -n formula_name

没有运气,所以我尝试强制链接节点…

➜  ~  brew link -f node
Linking /usr/local/Cellar/node/0.8.10... Warning: Could not link node. Unlinking...

Error: Permission denied - /usr/local/lib/dtrace/node.d

我在任何方面都不熟悉dtrace,而且害怕弄乱权限,所以我尝试sudo。

➜ ~ git:(master) sudo brew link -f node
Password:
Error: Cowardly refusing to `sudo brew link'
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.

我尝试通过卸载节点,brew uninstall node然后重试安装,但是没有运气。


问题答案:

现在,用于node.js的Homebrew软件包再次包含了npm,因此,当我错过了homebrew软件包中有关先删除独立版本的消息时,这发生了。

假设,像我一样,你已经通过尝试升级知道要打破之前节点/ NPM npm uninstall npm -g首先,你可以rm -rf /usr/local/lib/node_modules/npmbrew link node。这将删除 独立的
自托管npm软件包(而不是要安装的一台brew),并让Brew从Cellar对其捆绑的软件包进行符号链接。



 类似资料:
  • 我试图通过Homebrew安装node.js。不幸的是,我得到了这个错误: 然后我尝试手动链接节点... 运气不好,所以我试着强行连接节点... 我对dtrace在任何方面都不熟悉,我害怕弄乱权限,所以我尝试了sudo。。 我尝试通过卸载节点并重试安装,但没有运气。

  • 希望这里有人能给我指明正确的方向。 谢谢!

  • 我已经使用Passkit框架在我的iOS应用程序中实现了apple pay。为了建立apple Pay,我做了所有这些事情。我在用沙箱帐户。我在钱包应用程序中添加了卡,这些卡是我从这个链接复制的测试卡。我正在使用的代码: 我正在使用的所有委托: Apple pay viewcontroller正在显示,此屏幕显示的是一个处理圆视图。 但几秒钟后,我收到了这个错误消息:

  • 我已经配置了我的 REST/Spring/Jersey 项目,以使用 enunciate 为 API 生成文档。 我的pom中的相关变化。xml是 我的发音。xml如下 当我运行我的maven项目时,我收到以下初始化发音错误。正如您所看到的,错误不是很有帮助。任何提示我的配置中可能有什么错误。 --- maven-enunciate-spring-plugin:1.28:assemble (def

  • 问题内容: 错误代码1603。Java更新未完成。我有一个Java错误 我认为这是服务器问题,这是我第一次创建服务器且用户界面未打开。 问题答案: 从https://java.com/en/download/help/error_1603.xml 选项1:重新启动系统并卸载旧版本 在安装之前重新启动系统 一旦看到1603错误,请重新启动系统。 下载并安装脱机安装程序包。 出现提示时,在下载对话框中

  • 我使用的是Symfony的作曲家,我发现在我安装或更新任何新的包后,通过运行它会将东西复制到相应的文件夹,但在完成这个过程之前会抛出一些错误。 加载具有包信息更新依赖项的composer存储库-安装KNPLAB/knp组件(开发主机163308e)克隆163308ed3442e7e9ec4a45ff912664e366954c82 安装knplabs/knp-page inator-bundle(