安装Atom编辑器时出错



我已经安装了nodejs-legacy,没有问题。

然而,当我尝试运行script/build时,我得到以下错误:

npm WARN prefer global npm@1.4.10 should be installed with -g
npm WARN package.json csslint@0.9.10 No README.md file found!
npm WARN package.json highlight.js@7.3.0 No README.md file found!
make: g++: Command not found
make: *** [Release/obj.target/runas/src/main.o] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/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 Linux 3.11.0-12-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/atom/build/node_modules/runas
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.9
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! runas@0.5.4 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the runas@0.5.4 install script.
npm ERR! This is most likely a problem with the runas 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 runas
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "--userconfig=/var/www/atom/.npmrc" "install" "--quiet"
npm ERR! cwd /var/www/atom/build
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm WARN prefer global grunt-cli@0.1.13 should be installed with -g
make: g++: Command not found
make: *** [Release/obj.target/dump_syms/deps/breakpad/src/common/dwarf/bytereader.o] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/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 Linux 3.11.0-12-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/atom/build/node_modules/minidump
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.9
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 WARN package.json uid2@0.0.3 No README.md file found!
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/atom/build/npm-debug.log
npm ERR! not ok code 0

出现这个错误是因为我安装了nodejs-legacy吗?我该怎么办?

编辑:我忘了安装g++,当我尝试运行script/build时,我得到了这个很长的消息:http://pastebin.com/vBpxrE7A

从你的日志来看,它看起来像这里描述的节点-gyp问题-我建议特别注意这个答案。

通常人们建议重新安装node-gyp(使用存储库,npm或源代码)和/或恢复到Python 2.6 -似乎node-gyp依赖于这个Python版本,而恢复到2.6是我在上面引用的答案中指出的方法。

嗯,我知道在SO术语中已经晚了(将近两周!),但希望它会有所帮助:)

最新更新