我是靠谱客的博主 文艺长颈鹿,最近开发中收集的这篇文章主要介绍linux系统初始化失败,linux下npm 初始化失败 bcrypt安装失败,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

[root@iZ2zeir1m7i4blbm9dcgzgZ nodeservice]# npm install

> bcrypt@5.0.0 install /usr/local/nodeservice/node_modules/bcrypt

> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download

node-pre-gyp WARN Pre-built binaries not installable for bcrypt@5.0.0 and node@12.16.1 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)

node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/nodeservice/node_modules/bcrypt/lib'

gyp WARN EACCES current user ("ccaa") does not have permission to access the dev dir "/root/.cache/node-gyp/12.16.1"

gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/nodeservice/node_modules/bcrypt/.node-gyp"

gyp WARN install got an error, rolling back install

gyp WARN install got an error, rolling back install

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/nodeservice/node_modules/bcrypt/.node-gyp'

gyp ERR! System Linux 3.10.0-957.27.2.el7.x86_64

gyp ERR! command "/root/node-v12.16.1-linux-x64/bin/node" "/root/node-v12.16.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/nodeservice/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/usr/local/nodeservice/node_modules/bcrypt/lib/binding/napi-v3" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"

gyp ERR! cwd /usr/local/nodeservice/node_modules/bcrypt

gyp ERR! node -v v12.16.1

gyp ERR! node-gyp -v v5.0.5

gyp ERR! not ok

node-pre-gyp ERR! build error

node-pre-gyp ERR! stack Error: Failed to execute '/root/node-v12.16.1-linux-x64/bin/node /root/node-v12.16.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/nodeservice/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/nodeservice/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)

node-pre-gyp ERR! stack at ChildProcess. (/usr/local/nodeservice/node_modules/node-pre-gyp/lib/util/compile.js:83:29)

node-pre-gyp ERR! stack at ChildProcess.emit (events.js:311:20)

node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)

node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

node-pre-gyp ERR! System Linux 3.10.0-957.27.2.el7.x86_64

node-pre-gyp ERR! command "/root/node-v12.16.1-linux-x64/bin/node" "/usr/local/nodeservice/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd /usr/local/nodeservice/node_modules/bcrypt

node-pre-gyp ERR! node -v v12.16.1

node-pre-gyp ERR! node-pre-gyp -v v0.15.0

node-pre-gyp ERR! not ok

Failed to execute '/root/node-v12.16.1-linux-x64/bin/node /root/node-v12.16.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/nodeservice/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/nodeservice/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! bcrypt@5.0.0 install: `node-pre-gyp install --fallback-to-build`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the bcrypt@5.0.0 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/2020-08-10T10_13_34_009Z-debug.log

读写系统文件权限不足

执行以下命令

npm -g config set user root

最后

以上就是文艺长颈鹿为你收集整理的linux系统初始化失败,linux下npm 初始化失败 bcrypt安装失败的全部内容,希望文章能够帮你解决linux系统初始化失败,linux下npm 初始化失败 bcrypt安装失败所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部