簡體   English   中英

安裝Atom編輯器時出錯

[英]Error while installing the 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 ++,並且當我嘗試運行腳本/生成時,我得到以下消息: http ://pastebin.com/vBpxrE7A

從您的日志來看,它看起來像這里描述的node-gyp問題-我建議特別注意這個答案

通常,人們建議重新安裝node-gyp(使用存儲庫,npm或源代碼)和/或還原為Python 2.6-似乎node-gyp依賴於此Python版本,而還原為2.6是我在上面引用的答案中指出的方法。

好吧,我知道這已經很晚了(將近兩個星期!),但希望它會有所幫助:)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM