1

我正在尝试安装 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。我将它安装为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
4

1 回答 1

2

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

一个是您使用的是相当古老nodenpm. 您关注的数字海洋指南有点过时了。node您应该按照此处的指南更新到新的打包节点 0.10.35,而不是构建自己的版本 0.10.4: 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

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

于 2014-12-27T05:56:51.190 回答