简体   繁体   English

安装Atom编辑器时出错

[英]Error while installing the Atom editor

I have installed the nodejs-legacy, and it was no problem. 我已经安装了nodejs-legacy,这没问题。

However, when I try do run script/build, I get the following error: 但是,当我尝试运行脚本/构建时,出现以下错误:

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

Does this error occour because I've installed nodejs-legacy? 我安装了nodejs-legacy后,是否会发生此错误? How should I do? 我应该怎么做?

EDIT: I've forgott to install g++, and when I try to run script/build, I get this looong message: http://pastebin.com/vBpxrE7A 编辑:我忘记安装g ++,并且当我尝试运行脚本/生成时,我得到以下消息: http ://pastebin.com/vBpxrE7A

From your log it looks like node-gyp problem described here - I suggest paying special attention to this answer . 从您的日志来看,它看起来像这里描述的node-gyp问题-我建议特别注意这个答案

Generally people suggest reinstalling node-gyp (using repositories, npm or sources) and/or reverting to Python 2.6 - it seems that node-gyp depends on this Python version and reverting to 2.6 is the approach pointed out in answer I quoted above. 通常,人们建议重新安装node-gyp(使用存储库,npm或源代码)和/或还原为Python 2.6-似乎node-gyp依赖于此Python版本,而还原为2.6是我在上面引用的答案中指出的方法。

Well, I know it's late in SO terms (nearly two weeks!), but hope it will be of some use :) 好吧,我知道这已经很晚了(将近两个星期!),但希望它会有所帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM