gpt4 book ai didi

node.js - aglio API 蓝图呈现安装错误

转载 作者:太空宇宙 更新时间:2023-11-03 17:19:35 25 4
gpt4 key购买 nike

我正在尝试安装aglio,https://github.com/danielgtaylor/aglio由于出现错误而无法继续。

npm ERR! Failed at the protagonist@0.17.1 install script 'node-gyp rebuild'.

我的服务器是cento OS 6.5,

我按照此处的说明安装了 Node js https://www.digitalocean.com/community/tutorials/how-to-install-and-run-a-node-js-app-on-centos-6-4-64bit

然后它显示另一个错误,因为未找到 CoffeeScript 1.8.0。我将它安装为 npm install -g coffee-script

所以请建议我如何摆脱这个错误。

这是有关错误的完整信息。

[root@hellop ~]# npm install -g aglio
npm WARN optional dep failed, continuing fsevents@0.3.1

> ws@0.5.0 install /usr/local/lib/node_modules/aglio/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

^C[root@hellop ~]# npm install aglio
npm WARN optional dep failed, continuing fsevents@0.3.1

> ws@0.5.0 install /root/node_modules/aglio/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/root/node_modules/aglio/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/root/node_modules/aglio/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'

> ws@0.4.31 install /root/node_modules/aglio/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/root/node_modules/aglio/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/root/node_modules/aglio/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'

> protagonist@0.17.1 install /root/node_modules/aglio/node_modules/protagonist
> node-gyp rebuild

make: Entering directory `/root/node_modules/aglio/node_modules/protagonist/build'
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CBlueprint.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CBlueprintSourcemap.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CSourceAnnotation.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/HTTP.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Section.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Serialize.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeJSON.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeYAML.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Signature.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o] Error 1
make: Leaving directory `/root/node_modules/aglio/node_modules/protagonist/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/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:784:12)
gyp ERR! System Linux 2.6.32-431.20.3.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/aglio/node_modules/protagonist
gyp ERR! node -v v0.10.4
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 2.6.32-431.20.3.el6.x86_64
npm ERR! argv "node" "/usr/local/bin/npm" "install" "aglio"
npm ERR! node v0.10.4
npm ERR! npm v2.1.16
npm ERR! code ELIFECYCLE

npm ERR! protagonist@0.17.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@0.17.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the protagonist 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 protagonist
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
[root@hellop ~]# npm install protagonist

最佳答案

这里有两个不同的问题。

一个是您使用的是相当旧的 nodenpm .您正在关注的 digital ocean 指南有点过时了。而不是构建自己的 node版本 0.10.4,您应该按照此处的指南更新到新的打包 Node 0.10.35:https://github.com/nodesource/distributions#usage-instructions-1


sudo -s
curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs
yum groupinstall 'Development Tools'
ctrl+D

然后更新到最新npm


sudo npm install -g npm@latest

这将解决您的第一个问题,一个过时的 nodenpm .现在谈谈您的第二个问题,即您无法构建 protagonist .您遇到了内部编译器错误:

CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o] Error 1

如果在您更新 node 后这种情况仍然存在和 npm ,那么最可能的原因是硬件错误、损坏的编译器或实用程序,或者 protagonist 中的非常严重的问题。包裹。请告诉我,我会尽力帮助您进一步解决问题。

关于node.js - aglio API 蓝图呈现安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27653409/

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