安装Atom编辑器时出错

时间:2014-05-07 11:35:37

标签: node.js github atom-editor

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

但是,当我尝试运行脚本/构建时,我收到以下错误:

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 ++,当我尝试运行脚本/构建时,我得到了这个looong消息: http://pastebin.com/vBpxrE7A

1 个答案:

答案 0 :(得分:0)

从您的日志中看起来似乎是here描述的node-gyp问题 - 我建议您特别注意this answer

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

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