aglio API蓝图渲染安装错误

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

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

我的服务器是cento OS 6.5,

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

然后显示咖啡脚本1.8.0没有find另一个错误。 我把它安装成npm install -g coffee-script

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

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

 [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 

       

网上收集的解决方案 "aglio API蓝图渲染安装错误"

你在这里有两个不同的问题。

一个是你使用了一个相当旧的nodenpm 。 你所关注的数字海洋指南有点过时了。 而不是构build自己的node版本0.10.4,您应该按照以下指南更新到一个新的打包节点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 。 现在解决你的第二个问题,那就是你无法build立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

如果在更新nodenpm之后仍然存在,则最可能的原因是硬件错误,编译器或实用程序损坏,或protagonist包中的一个非常严重的问题。 请让我知道,我会尽力帮助您进一步排除故障。