brew install node 报错:Error: No such file or directory @ dir_chdir Bottle installation failed:

在终端输入 brew install node 回车 报错如下图

brew install node
==> Installing dependencies for node: icu4c
==> Installing node dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-62.1.mojave.bottle.ta
Already downloaded:
/Users/lvhongjian/Library/Caches/Homebrew/downloads/2ac513734226effaf79e199fb1612ebce7842df443578bcd61afd73767858aef–icu4c-62.1.mojave.bottle.tar.gz
Error: No such file or directory @ dir_chdir - /usr/local/Cellar
Warning: Bottle installation failed: building from source.
==> Downloading https://ssl.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz
Already downloaded:
/Users/lvhongjian/Library/Caches/Homebrew/downloads/b79f5dd51110fb1096e57fc35ba03df84f69142b0374bae8a0381edde5a80448–icu4c-62_1-src.tgz
Error: An exception occurred within a child process: Errno::EPERM:
Operation not permitted @ dir_s_mkdir - /usr/local/Cellar

解决办法

由于登陆用户不是HomeBrew的安装用户、所以报以上错误这里解决如下:
1.在当前用户重新安装HomeBrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.运行brew install node提示成功
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值