NodeJS libtool错误“无选项:安装/编译openzwave时使用“-static”

axkjgtzd  于 2023-03-17  发布在  Node.js
关注(0)|答案(3)|浏览(129)

npm安装openzwave失败-编译失败。libtool错误:无选项“-static”
达尔文13.3.0达尔文内核版本13.3.0,MacBookPro 11,2达尔文

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/me/git/node-zwaveTest/node_modules/openzwave
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Darwin 13.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "instal" "openzwave"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.6
npm ERR! code ELIFECYCLE

npm ERR! openzwave@0.0.32 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the openzwave@0.0.32 install script.
npm ERR! This is most likely a problem with the openzwave package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls openzwave
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/me/git/node-zwaveTest/npm-debug.log
q5lcpyga

q5lcpyga1#

问题:系统上安装了多个libtools。需要使用/usr/bin/中的libtools。请根据安装方法更改路径或生成文件。
非参数法

$ export PATH=/usr/local/bin:$PATH
$ npm instal openzwave

来源:

$ svn checkout http://open-zwave.googlecode.com/svn/trunk/ open-zwave-read-only 
$ make (fails, but creates build directory we need)
$ vi ./cpp/build/support.mk
(Find AR := line and change libtool to /usr/bin/libtool, save, quit)
$ make
fun and profit.
f4t66c6m

f4t66c6m2#

虽然这个问题已经有18个月了,但我认为您应该尝试安装最新的OpenZWave,然后尝试安装openzwave-shared(npm install openzwave-shared)。这是一个节点插件(开始时是您尝试安装的节点包的一个分支),它在动态链接到底层OpenZWave C++库时解耦了它的编译。

p8ekf7hl

p8ekf7hl3#

$ which libtool              
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool

但是/usr/local/bin/libtool
/usr/local/bin/libtool修改为库工具

相关问题