mosca icon indicating copy to clipboard operation
mosca copied to clipboard

Installation issue

Open neilunadkat opened this issue 11 years ago • 3 comments

I ran the command

sudo npm install mosca

These are the building messages

> [email protected] install /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/zmq
> node-gyp rebuild

make: Entering directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
 #include <zmq.h>
                 ^
compilation terminated.
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/zmq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-44-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
cwd /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/zmq
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 

> [email protected] install /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/mqtt/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/mqtt/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 `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/mqtt/node_modules/ws/build'
npm WARN optional dep failed, continuing [email protected]

> [email protected] install /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/mongodb/node_modules/kerberos/build'
  CXX(target) Release/obj.target/kerberos/lib/kerberos.o
make: Leaving directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/mongodb/node_modules/kerberos/build'

> [email protected] install /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq
> node-gyp rebuild

make: Entering directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
 #include <zmq.h>
                 ^
compilation terminated.
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-44-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]
-
> [email protected] install /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/buffertools
> node-gyp rebuild

make: Entering directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/buffertools/build'
  CXX(target) Release/obj.target/buffertools/buffertools.o
  SOLINK_MODULE(target) Release/obj.target/buffertools.node
  SOLINK_MODULE(target) Release/obj.target/buffertools.node: Finished
  COPY Release/buffertools.node
make: Leaving directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/buffertools/build'

> [email protected] install /home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/ubuntu/obd-backend/node-decoder/node_modules/mosca/node_modules/mongodb/node_modules/bson/build'
  CXX(target) Release/obj.target/bson/ext/bson.o

It gets stuck over here. I cannot understand the failures. Though after this if I exit the process, and run the code it works. But at the start it shows this error

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version

Im on node 0.10.33 on ubuntu 14.04.

neilunadkat avatar May 22 '15 13:05 neilunadkat

A full log of the installation is needed to help you debug your issues. However all those failing depencencies are optional, so they should not cause problems when installing.

mcollina avatar May 25 '15 07:05 mcollina

sudo apt-get install libzmq3 libzmq3-dev

mazhack avatar Jun 09 '15 21:06 mazhack

Is there any way to install without the dependencies ? It works but now everytime something gets installed there wil pop up an error about the zmq stream which confuses everyone.

StromFLIX avatar Mar 15 '19 14:03 StromFLIX