我正在尝试在节点0.12中安装node_xslt模块,但它失败了。我有python版本2.7和node-gyp版本2.0.2。
这是错误堆栈 -
> node_xslt@0.1.9 preinstall /home/ritesh/Ritesh/projects/applane1/node_modules/node_xslt
> node-gyp rebuild
/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/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ritesh/Ritesh/projects/applane1/node_modules/node_xslt
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Linux 3.13.0-32-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node_xslt"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! node_xslt@0.1.9 preinstall: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node_xslt@0.1.9 preinstall script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node_xslt 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 node_xslt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /node_modules/npm-debug.log
安装其他模块时也出现此错误,即xslt4node。
答案 0 :(得分:3)
刚刚遇到了同样的问题,虽然这个问题已经有 5 年多的历史了,但可能对其他人有用。我解决了使用 nvm 切换到不同版本节点的问题:nvm use 12
在我的情况下。
答案 1 :(得分:0)
尝试安装plt.figure()