gpt4 book ai didi

node.js - 安装 Atom 编辑器时出错

转载 作者:太空宇宙 更新时间:2023-11-04 02:34:42 25 4
gpt4 key购买 nike

我已经安装了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++,当我尝试运行 script/build 时,我收到这条长消息: http://pastebin.com/vBpxrE7A

最佳答案

从你的日志来看,它看起来像描述的node-gyp问题here - 我建议特别关注this answer

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

嗯,我知道现在已经晚了(将近两周!),但希望它会有一些用处:)

关于node.js - 安装 Atom 编辑器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23516710/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com