无法在debian上安装node-libcurl
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法在debian上安装node-libcurl相关的知识,希望对你有一定的参考价值。
请告诉我,为什么我无法安装node-libcurl。以下是安装时显示的错误(npm install node-libcurl):
> node-libcurl@1.3.0 install /var/www/node/node_modules/node-libcurl
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/JCMais/node-libcurl/releases/download/v1.3.0/node_libcurl-v1.3.0-node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-libcurl@1.3.0 and node@8.9.4 (node-v57 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/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 2.6.32-042stab127.2
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/node/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/var/www/node/node_modules/node-libcurl/lib/binding"
gyp ERR! cwd /var/www/node/node_modules/node-libcurl
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
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=/var/www/node/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/var/www/node/node_modules/node-libcurl/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/var/www/node/node_modules/node-libcurl/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 2.6.32-042stab127.2
node-pre-gyp ERR! command "/usr/bin/node" "/var/www/node/node_modules/node-libcurl/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/www/node/node_modules/node-libcurl
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
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=/var/www/node/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/var/www/node/node_modules/node-libcurl/lib/binding' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-libcurl@1.3.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-libcurl@1.3.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/2018-03-04T22_33_32_704Z-debug.log
答案
安装依赖项:
# apt install build-essential libssl-dev libcurl4-gnutls-dev libcurl4-openssl-dev
安装Node.js V9:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
使用5.6.0
npm版本安装过程应该没有问题:
$ npm init
$ npm install node-libcurl --save
校验:
npm ls | grep node-libcurl
node-libcurl@1.3.0
以上是关于无法在debian上安装node-libcurl的主要内容,如果未能解决你的问题,请参考以下文章
在debian linux上全新安装后,Gradle无法正常工作
无法在Debian wheezy上安装chef-server
无法在 Debian 上启动独立的 parse.com 服务器