我无法安装 node-libcurl 模块
I can not install node-libcurl module
我正在尝试在 Ubuntu 上安装 node-libcurl 模块。要安装,我使用以下命令:
npm install node-libcurl --save
但是我遇到了这个问题:
node-pre-gyp ERR! Tried to download(404): https://github.com/JCMais/node-libcurl/releases/download/v1.1.0/node_libcurl-v1.1.0-node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-libcurl@1.1.0 and node@8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/myfolder/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.2.0-42-generic
gyp ERR! command "/usr/local/bin/node" "/home/myfolder/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/myfolder/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/home/myfolder/node_modules/node-libcurl/lib/binding"
gyp ERR! cwd /home/myfolder/node_modules/node-libcurl
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.2.0-42-generic
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-libcurl@1.1.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-libcurl@1.1.0 install script.
谁能帮忙解决这个问题?
过了一段时间,我发现机器上没有安装libcurl。之前没有意识到,因为报错信息没有提到,所以不清楚。
我解决了:
apt-get install libcurl4-openssl-dev
并且:
npm install node-libcurl --build-from-source
我正在尝试在 Ubuntu 上安装 node-libcurl 模块。要安装,我使用以下命令:
npm install node-libcurl --save
但是我遇到了这个问题:
node-pre-gyp ERR! Tried to download(404): https://github.com/JCMais/node-libcurl/releases/download/v1.1.0/node_libcurl-v1.1.0-node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-libcurl@1.1.0 and node@8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error:
gyp
failed with exit code: 1gyp ERR! stack at ChildProcess.onCpExit (/home/myfolder/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.2.0-42-generic
gyp ERR! command "/usr/local/bin/node" "/home/myfolder/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/myfolder/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/home/myfolder/node_modules/node-libcurl/lib/binding"
gyp ERR! cwd /home/myfolder/node_modules/node-libcurl
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.2.0-42-generic
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-libcurl@1.1.0 install:
node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-libcurl@1.1.0 install script.
谁能帮忙解决这个问题?
过了一段时间,我发现机器上没有安装libcurl。之前没有意识到,因为报错信息没有提到,所以不清楚。
我解决了:
apt-get install libcurl4-openssl-dev
并且:
npm install node-libcurl --build-from-source