CentOS上安装remix-ide错误及解决方法

发布时间:2019-06-05 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了CentOS上安装remix-ide错误及解决方法脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

remix-ide安装文档:https://github.com/ethereum/r...

本机环境:

> lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID:    CentOS
Description:    CentOS Linux release 7.4.1708 (Core)
Release:    7.4.1708
Codename:    Core

> node --version
v8.9.3

> npm --version
6.1.0

安装

> npm install remix-ide -g

启动

> remix-ide

然后报错了...,错误信息如下:

Error: Cannot find module './build/Release/scrypt'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/services/apps/node-v8.9.3-linux-x64/lib/node_modules/remix-ide/node_modules/scrypt/index.js:3:20)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/services/apps/node-v8.9.3-linux-x64/lib/node_modules/remix-ide/node_modules/scrypt.js/node.js:1:76)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/services/apps/node-v8.9.3-linux-x64/lib/node_modules/remix-ide/node_modules/web3-eth-accounts/src/index.js:35:16)
    at Module._compile (module.js:635:30)

看异常信息,应该是缺少scrypt包,检查系统node_modules目录

ll /services/apps/node-v8.9.3-linux-x64/lib/node_modules/

确实没有scrypt

然后安装scrpt
scrpt文档 https://www.npmjs.com/package...
具体执行步骤:

> npm install -g node-gyp
> npm install -g scrypt

在安装node-gyp时,又报了一个错误:WARN EACCES user “root” does not have permission to access the dev dir
解决方案:https://github.com/nodejs/nod...
具体解决办法就是安装时加上--unsafe-perm参数

npm install --unsafe-perm --verbose -g node-gyp

安装完scrypt后,执行remix-ide仍然报错,继续探索,终于找到了解决方案
https://github.com/barrysteyn...

具体执行

cd /services/apps/node-v8.9.3-linux-x64/lib/node_modules/scrypt
node-gyp configure build

编译成功

最后再执行remix-ide,完美,成功启动



欢迎订阅「K叔区块链」 - 专注于区块链技术学习

CentOS上安装remix-ide错误及解决方法


博客地址:http://www.jouypub.com
简书主页:https://www.jianshu.com/u/756c9c8ae984
segmentfault主页:https://segmentfault.com/blog/jouypub
腾讯云主页:https://cloud.tencent.com/developer/column/72548

脚本宝典总结

以上是脚本宝典为你收集整理的CentOS上安装remix-ide错误及解决方法全部内容,希望文章能够帮你解决CentOS上安装remix-ide错误及解决方法所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: