安装node_xslt时出错

时间:2014-04-30 21:08:56

标签: node.js npm

我正在尝试安装: npm install node_xslt 但始终显示跟随错误:

/bin/sh: 1: xml2-config: not found
gyp: Call to 'xml2-config --cflags' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/arw150/Desktop/node_modules/node_xslt
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1
npm ERR! not ok code 0

有些人对这个错误有所了解吗?

1 个答案:

答案 0 :(得分:0)

正如它所说,你遗失了xml2-config。解决方案很简单:

apt-get install libxml-dev