Node.js 在Ubuntu18.04上安装npm失败,错误为;失败bcrypt@3.0.3安装脚本";

Node.js 在Ubuntu18.04上安装npm失败,错误为;失败bcrypt@3.0.3安装脚本";,node.js,mean-stack,npm-install,bcrypt,ubuntu-18.04,Node.js,Mean Stack,Npm Install,Bcrypt,Ubuntu 18.04,我在Ubuntu18.04上设置nodejs项目时遇到以下错误。安装的npm版本为6.x,安装的节点版本为10.x 我搜索了修复等,但没有得到任何适当的修复 bcrypt@3.0.3 install /home/ubuntu/reko_dev/web/backend/node_modules/bcrypt > node-pre-gyp install --fallback-to-build node-pre-gyp WARN Using needle for node-pre-g

我在Ubuntu18.04上设置nodejs项目时遇到以下错误。安装的npm版本为6.x,安装的节点版本为10.x

我搜索了修复等,但没有得到任何适当的修复

    bcrypt@3.0.3 install /home/ubuntu/reko_dev/web/backend/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 Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v64-linux-x64-glibc.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.3 and node@10.15.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Linux 4.15.0-1021-aws
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /home/ubuntu/reko_dev/web/backend/node_modules/bcrypt
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Linux 4.15.0-1021-aws
node-pre-gyp ERR! command "/usr/bin/node" "/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ubuntu/reko_dev/web/backend/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN mongoose-auto-increment@5.0.1 requires a peer of mongoose@^4.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN rekogapiserver@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@3.0.3 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@3.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!     /home/ubuntu/.npm/_logs/2019-01-08T17_09_19_086Z-debug.log
bcrypt@3.0.3安装/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt
>节点预gyp安装--回退到构建
节点预gyp警告使用针进行节点预gyp https下载
尝试下载节点前gyp警告(404):https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v64-linux-x64-glibc.tar.gz 
未找到的节点pre-gyp WARN预构建二进制文件bcrypt@3.0.3及node@10.15.0(node-v64 ABI,glibc)(使用node-gyp返回到源代码编译)
哎呀!构建错误
哎呀!堆栈错误:未找到:make
哎呀!getNotFoundError处的堆栈(/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
哎呀!堆栈位于F(/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
哎呀!堆栈位于E(/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
哎呀!堆栈位于/usr/lib/node_modules/npm/node_modules/which/which.js:89:16
哎呀!堆栈位于/usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
哎呀!堆栈位于/usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
哎呀!堆栈在FSReqWrap.oncomplete(fs.js:154:21)
哎呀!Linux系统4.15.0-1021-aws
哎呀!命令“/usr/bin/node”“/usr/lib/node_modules/npm/node_modules/node gyp/bin/node gyp.js”“build”“--fallback to build”“--module=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding/bcrypt_-lib.node”“--module_name=bcrypt=bcrypt_-lib”“--模块路径=/home/ubuntu/ubuntu/reko-dev/web/backend/node/node\node/bcrypt-modules/lib/“--node_abi_napi=napi”“--napi_build_version=0”“--node_napi_label=node-v64”
gyp ERR!cwd/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt
GypErr!节点-v10.15.0
gyp ERR!节点gyp-v3.8.0
哎呀!不行
节点预gyp错误!生成错误
node pre-gyp ERR!堆栈错误:未能执行“/usr/bin/node/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build--fallback to build--module=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/bcrypt/lib.node--modules_-name=bcrypt_-lib--modules路径=/home/ubuntu/reko-dev/web/backend/node_模块/bcrypt/lib/lib/lib/binding--napi_version=3--node_abi_napi=napi--napi_build_version=0--node_napi_label=node-v64'(1)
node pre-gyp ERR!在ChildProcess上堆栈。(/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/node_modules/node pre-gyp/lib/util/compile.js:83:29)
ChildProcess.emit(events.js:182:13)处的节点pre-gyp ERR!堆栈
maybeClose处的节点预gyp ERR!堆栈(internal/child_process.js:962:16)
node pre-gyp ERR!在Process.ChildProcess.\u handle.onexit处堆栈(internal/child\u Process.js:251:5)
节点预gyp ERR!系统Linux 4.15.0-1021-aws
node pre-gyp ERR!command“/usr/bin/node”“/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/node_modules/.bin/node pre-gyp”“install”“--回退到构建”
node pre-gyp ERR!cwd/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt
节点前gyp错误!节点-v10.15.0
节点预gyp错误!节点预gyp-v v0.12.0
节点预gyp错误!不正常
无法执行“/usr/bin/node/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js构建--回退到构建--module=/home/ubuntu/reko_dev/web/backend/node_modules/bcrypt/lib/binding/bcrypt_lib.node--module_name=bcrypt___-lib--module路径=/home/ubuntu/reko/reko/lib/web/backend/node/node/node/node/node_模块/node/node\u版本=3--node_abipi=napi--napi\u build\u version=0--node\u napi\u label=node-v64'(1)
npm警告猫鼬汽车-increment@5.0.1需要mongoose@^4.1.12的对等方,但未安装任何对等方。您必须自己安装对等依赖项。
npm警告rekogapiserver@1.0.0没有存储库字段。
npm错误!代码错误周期
npm错误!错误1
npm错误!bcrypt@3.0.3install:`node pre-gyp install--回退到构建`
npm错误!退出状态1
npm错误!
npm ERR!在以下位置失败:bcrypt@3.0.3安装脚本。
npm错误!这可能不是npm的问题。上面可能还有其他日志输出。
npm ERR!此运行的完整日志可在以下位置找到:
npm ERR!/home/ubuntu/.npm/_logs/2019-01-08T17_09_19_086Z-debug.log

正如@tkausl所提到的,似乎没有安装
make

sudo-apt-get-update
sudo-apt-get-install-build-essential

正如@tkausl所提到的,似乎没有安装
make

sudo-apt-get-update
sudo-apt-get-install-build-essential

错误:未找到:make
您是否尝试安装make?出现此错误的原因是
节点pre-gyp
。您需要安装它所需的一些二进制文件。安装
节点pre-gyp
可能您将不得不安装python、ruby和make。@tkausl不起作用。@jprivillaso我安装了节点pre-gyp和python n-ruby。它不起作用idnt work ut
错误:未找到:make
您是否尝试安装make?出现此错误的原因是
节点pre-gyp
。您需要安装它所需的一些二进制文件。安装
节点pre-gyp
可能您必须安装python、ruby和make。@tkausl没有工作。@jprivillaso我安装了节点pre-gyp和python n ruby。它不起作用