aglio API blueprint render installing error

1.9k views Asked by At

I am trying to install aglio, https://github.com/danielgtaylor/aglio and unable to proceed forward due to an error i am getting.

npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.

My server is cento OS 6.5,

I installed node js as explained here https://www.digitalocean.com/community/tutorials/how-to-install-and-run-a-node-js-app-on-centos-6-4-64bit

And then it showed another error as coffee script 1.8.0 is not found. the i installed it as npm install -g coffee-script

so please suggest me how to get rid of this error.

This is the full information about the error.

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

> [email protected] 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 [email protected]

> [email protected] 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'

> [email protected] 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'

> [email protected] 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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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
1

There are 1 answers

0
Sam Mikes On BEST ANSWER

You have two different problems here.

One is that you are using quite an old node and npm. The digital ocean guide you are following is a bit out of date. Instead of building your own node version 0.10.4, you should update to a new packaged node 0.10.35 by following the guide here: 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

Then update to the latest npm

sudo npm install -g npm@latest

That will fix your first problem, an out-of-date node and npm. Now on to your second problem, which is that you can't build protagonist. You are running into an internal compiler error:

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

If this persists even after you have updated node and npm, then the most likely causes are a hardware error, a corrupt compiler or utility, or a very serious problem in the protagonist package. Please let me know, and I will try to help you troubleshoot it further.