mac 安装web3 失败

下面是我的错误日志

lidongxudeMacBook-Pro:~ lidongxu$ sudo npm install -g web3

npm WARN deprecated tar.gz@1.0.7: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar

npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support



> scrypt@6.0.3 preinstall /usr/local/lib/node_modules/web3/node_modules/scrypt

> node node-scrypt-preinstall.js



Error: Error: Command failed: ./configure

./configure: line 1904: config.log: Permission denied

./configure: line 1914: config.log: Permission denied





> scrypt@6.0.3 install /usr/local/lib/node_modules/web3/node_modules/scrypt

> node-gyp rebuild



gyp ERR! configure error 

gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/web3/node_modules/scrypt/build'

gyp ERR! System Darwin 17.5.0

gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /usr/local/lib/node_modules/web3/node_modules/scrypt

gyp ERR! node -v v8.11.3

gyp ERR! node-gyp -v v3.6.2

gyp ERR! not ok 

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the scrypt@6.0.3 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.



npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/lidongxu/.npm/_logs/2018-11-06T08_43_11_006Z-debug.log

是因为一些乱七八糟的问题

执行以下命令记得

sudo npm install --unsafe-perm -g web3

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值