Kon*_*nia 2 macos node.js node-gyp libxml-js
我在我的mac os x 10.9.3上构建libxmljs时遇到了问题.
这是我得到的:
3 warnings generated.
CC(target) Release/obj.target/libxml/vendor/libxml/xpointer.o
LIBTOOL-STATIC Release/xml.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [Release/xml.a] Error 1
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.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/libxmljs
gyp ERR! node -v v0.10.13
gyp ERR! node-gyp -v v0.10.2
gyp ERR! not ok
unbuild libxmljs@0.10.0
npm ERR! weird error 1
npm ERR! not ok code 0
Run Code Online (Sandbox Code Playgroud)
所以...这是一些奇怪的错误1.无法确切地弄清楚到底是什么.
用自制软件安装的节点.
好的.这是交易.为自制软件安装的node.js构建模块有一个描述的问题.
libtool: unrecognized option `-static'
Run Code Online (Sandbox Code Playgroud)
http://flummox-engineering.blogspot.ru/2014/04/libtool-unrecognized-option-static.html
当你使用自制软件的libtool时会发生这种情况.您应该使用位于/ usr/bin/libtool中的systemwide.
要解决此问题,您可以键入哪个libtool.如果它在/ usr/local/Cellar/libtool ....那么它就是自制软件.只需将其与此命令取消链接:
brew unlink libtool
Run Code Online (Sandbox Code Playgroud)
你的npm安装并再次链接回来
brew link libtool
Run Code Online (Sandbox Code Playgroud)
在我的情况下,我安装了与MAMP一起安装的libtool.所以我编辑了我的〜/ .bash_profile文件并删除了我最近添加了我自己的PATH ="/ Applications/MAMP/Library/bin:$ {PATH}"行.