【发布时间】:2017-03-02 11:41:27
【问题描述】:
我正在尝试在 Ubuntu 上使用 npm 安装 aerospike-node 客户端。
npm install aerospike
安装时出现类似错误
SOLINK_MODULE(target) Release/obj.target/aerospike.node
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
aerospike.target.mk:186: recipe for target 'Release/obj.target/aerospike.node' failed
make: *** [Release/obj.target/aerospike.node] Error 1
rm binding_gyp_aerospike_client_c_target_run_scripts_aerospike_client_c_sh.intermediate
make: Leaving directory '/home/sys1095/NodeProjects/aerospike-test/node_modules/aerospike/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-21-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/sys1095/NodeProjects/aerospike-test/node_modules/aerospike
gyp ERR! node -v v6.10.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN aerospike-test@1.0.0 No repository field.
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "aerospike"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
环境 :: node -v 6.10.0 ,node-gyp -v 3.4.0 ,npm -v 3.10.10.
我确实在 aerospike github 问题上对此进行了检查,但我没有得到任何东西(具体的)。 我认为主要问题从这里开始
/usr/bin/ld: cannot find -lz
我不明白它是什么。 节点版本或与 os(ubuntu) 相关的 gcc 编译器版本有问题。
帮我解决这个问题。
【问题讨论】:
-
您是否尝试搜索“主要问题”? serverfault.com/questions/481859/….
标签: node.js ubuntu error-handling client aerospike