最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

node.js安装web3模块scrypt问题

IT培训 admin 5浏览 0评论

node.js安装web3模块scrypt问题

我想要的只是在我的节点中安装web3。

我的节点版本是v8.9.4 web3版本是1.0.0-beta.46

但我不明白的是,scrypt一直在失败。我只是运行节点,我看到可怕的消息,我没有scrypt模块......

通常我只是安装我的模块而不是-g选项,但是--save one。但是我无法解决我的问题所以我只需用-g选项安装scrypt

# npm install -g scrypt

但错误信息我无法理解为什么它发生在我身上?

# npm install -g scrypt

> [email protected] preinstall /opt/nodejs/lib/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


> [email protected] install /opt/nodejs/lib/node_modules/scrypt
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/nodejs/lib/node_modules/scrypt/build'
gyp ERR! System Linux 2.6.32-754.3.5.el6.x86_64
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/nodejs/lib/node_modules/scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2019-02-15T10_44_58_509Z-debug.log

我尝试将web3重新安装到我的模块中,将显示该消息。我认为节点gyp是这个问题的关键,所以我可以问你关于为什么会出现这个问题的建议吗?

> [email protected] install /home/my_apps/node/node_modules/scrypt.js/node_modules/scrypt
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/my_apps/node/node_modules/scrypt.js/node_modules/scrypt/build'
gyp ERR! System Linux 2.6.32-754.3.5.el6.x86_64
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/my_apps/node/node_modules/scrypt.js/node_modules/scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

> [email protected] install /home/my_apps/node/node_modules/web3-eth-accounts/node_modules/scrypt.js/node_modules/scrypt
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/my_apps/node/node_modules/web3-eth-accounts/node_modules/scrypt.js/node_modules/scrypt/build'
gyp ERR! System Linux 2.6.32-754.3.5.el6.x86_64
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/my_apps/node/node_modules/web3-eth-accounts/node_modules/scrypt.js/node_modules/scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/scrypt.js/node_modules/scrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
回答如下:

所以我认为错误告诉您,您没有正确的文件系统访问权限来写入这些文件夹。

我的第一个想法是,你只是不允许在安装'全局'的文件夹中写入,但在第二次尝试中我认为你正在显示你在通常的文件夹中这样做。那么,当你尝试安装为--save时,它仍然会给你错误吗?它只适用于这个模块?是否有可能获得更多权限写入这些文件夹?

node.js安装web3模块scrypt问题

我想要的只是在我的节点中安装web3。

我的节点版本是v8.9.4 web3版本是1.0.0-beta.46

但我不明白的是,scrypt一直在失败。我只是运行节点,我看到可怕的消息,我没有scrypt模块......

通常我只是安装我的模块而不是-g选项,但是--save one。但是我无法解决我的问题所以我只需用-g选项安装scrypt

# npm install -g scrypt

但错误信息我无法理解为什么它发生在我身上?

# npm install -g scrypt

> [email protected] preinstall /opt/nodejs/lib/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


> [email protected] install /opt/nodejs/lib/node_modules/scrypt
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/nodejs/lib/node_modules/scrypt/build'
gyp ERR! System Linux 2.6.32-754.3.5.el6.x86_64
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/nodejs/lib/node_modules/scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2019-02-15T10_44_58_509Z-debug.log

我尝试将web3重新安装到我的模块中,将显示该消息。我认为节点gyp是这个问题的关键,所以我可以问你关于为什么会出现这个问题的建议吗?

> [email protected] install /home/my_apps/node/node_modules/scrypt.js/node_modules/scrypt
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/my_apps/node/node_modules/scrypt.js/node_modules/scrypt/build'
gyp ERR! System Linux 2.6.32-754.3.5.el6.x86_64
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/my_apps/node/node_modules/scrypt.js/node_modules/scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

> [email protected] install /home/my_apps/node/node_modules/web3-eth-accounts/node_modules/scrypt.js/node_modules/scrypt
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/my_apps/node/node_modules/web3-eth-accounts/node_modules/scrypt.js/node_modules/scrypt/build'
gyp ERR! System Linux 2.6.32-754.3.5.el6.x86_64
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/my_apps/node/node_modules/web3-eth-accounts/node_modules/scrypt.js/node_modules/scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/scrypt.js/node_modules/scrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
回答如下:

所以我认为错误告诉您,您没有正确的文件系统访问权限来写入这些文件夹。

我的第一个想法是,你只是不允许在安装'全局'的文件夹中写入,但在第二次尝试中我认为你正在显示你在通常的文件夹中这样做。那么,当你尝试安装为--save时,它仍然会给你错误吗?它只适用于这个模块?是否有可能获得更多权限写入这些文件夹?

与本文相关的文章

发布评论

评论列表 (0)

  1. 暂无评论