zeromq.node
zeromq.node copied to clipboard
npm install zmq error on ubuntu server
Hi,
I followed some threads about this topic (#55), but seem it does not resolve my problem.
Tried to execute this command: npm install zmq but get following error: npm install zmq npm http GET https://registry.npmjs.org/zmq npm http 304 https://registry.npmjs.org/zmq
[email protected] install /home/tiniplanet/pubsub/node_modules/zmq node-gyp rebuild
info it worked if it ends with ok
spawn python [ '/home/tiniplanet/.node-gyp/0.8.1/tools/gyp_addon',
'binding.gyp',
'-I/home/tiniplanet/pubsub/node_modules/zmq/build/config.gypi',
'-f',
'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory /home/tiniplanet/pubsub/node_modules/zmq/build' CXX(target) Release/obj.target/binding/binding.o ../binding.cc:29:17: fatal error: zmq.h: No such file or directory compilation terminated. make: *** [Release/obj.target/binding/binding.o] Error 1 make: Leaving directory
/home/tiniplanet/pubsub/node_modules/zmq/build'
ERR! Error: make
failed with exit code: 2
at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:212:23)
at ChildProcess.EventEmitter.emit (events.js:91:17)
at Process._handle.onexit (child_process.js:674:10)
ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the zmq 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 zmq
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.2.0-26-generic-pae
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "zmq"
npm ERR! cwd /home/tiniplanet/pubsub
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.24
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: node-gyp rebuild
npm ERR! message sh "-c" "node-gyp rebuild"
failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/tiniplanet/pubsub/npm-debug.log
npm not ok
Appreciate any suggestion/help.
Thanks in advance.
Similar problem here (Ubuntu 12.04 LTS):
sphere@spherez01:~/code/allosphere/av$ npm install zmq npm http GET https://registry.npmjs.org/zmq npm http 304 https://registry.npmjs.org/zmq
[email protected] preinstall /home/sphere/code/allosphere/av/node_modules/zmq node-waf clean || (exit 0); node-waf configure build
Nothing to clean (project not configured)
Setting srcdir to : /home/sphere/code/allosphere/av/node_modules/zmq
Setting blddir to : /home/sphere/code/allosphere/av/node_modules/zmq/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
Checking for pkg-config version >= 0.0.0 : yes
Checking for libzmq >= 2.1.0 : yes
Checking for library uuid : yes
'configure' finished successfully (0.108s)
Waf: Entering directory /home/sphere/code/allosphere/av/node_modules/zmq/build' [1/2] cxx: binding.cc -> build/Release/binding_1.o ../binding.cc:114:7: error: ‘uv_poll_t’ does not name a type ../binding.cc:115:35: error: ‘uv_poll_t’ has not been declared ../binding.cc:292:27: error: variable or field ‘UV_PollCallback’ declared void ../binding.cc:292:27: error: ‘uv_poll_t’ was not declared in this scope ../binding.cc:292:38: error: ‘handle’ was not declared in this scope ../binding.cc:292:46: error: expected primary-expression before ‘int’ ../binding.cc:292:58: error: expected primary-expression before ‘int’ ../binding.cc: In constructor ‘zmq::Socket::Socket(zmq::Context*, int)’: ../binding.cc:304:5: error: ‘poll_handle_’ was not declared in this scope ../binding.cc:304:24: error: expected type-specifier before ‘uv_poll_t’ ../binding.cc:304:24: error: expected ‘;’ before ‘uv_poll_t’ ../binding.cc:308:5: error: ‘uv_os_sock_t’ was not declared in this scope ../binding.cc:308:18: error: expected ‘;’ before ‘socket’ ../binding.cc:311:50: error: invalid conversion from ‘int (*)(int, int, int)throw ()’ to ‘void*’ [-fpermissive] /usr/include/zmq.h:223:16: error: initializing argument 3 of ‘int zmq_getsockopt(void*, int, void*, size_t*)’ [-fpermissive] ../binding.cc:312:64: error: ‘uv_poll_init_socket’ was not declared in this scope ../binding.cc:313:33: error: ‘UV_READABLE’ was not declared in this scope ../binding.cc:313:69: error: ‘uv_poll_start’ was not declared in this scope ../binding.cc: In member function ‘void zmq::Socket::Close()’: ../binding.cc:792:20: error: ‘poll_handle_’ was not declared in this scope ../binding.cc:792:32: error: ‘uv_poll_stop’ was not declared in this scope Waf: Leaving directory
/home/sphere/code/allosphere/av/node_modules/zmq/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
npm ERR! error installing [email protected]
npm ERR! [email protected] preinstall: node-waf clean || (exit 0); node-waf configure build
npm ERR! sh "-c" "node-waf clean || (exit 0); node-waf configure build"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.2.0-26-generic
npm ERR! command "node" "/usr/bin/npm" "install" "zmq"
npm ERR! cwd /home/sphere/code/allosphere/av
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] preinstall: node-waf clean || (exit 0); node-waf configure build
npm ERR! message sh "-c" "node-waf clean || (exit 0); node-waf configure build"
failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/sphere/code/allosphere/av/npm-debug.log
npm not ok
Anybody can help us on this?
Thanks.
Anyone got stuck in this error like me (not found header file), please try this: npm install https://github.com/mscdex/zeromq.node/tarball/master
It helps me resolve my issue as well :)
I had a problem installing also (when 'node-gyp rebuild' ran, there were many errors for undeclared identifies). The install worked fine with the mscdex fix (see previous comment).
Having the same problem on Ubuntu 12.04LTS (Not sure it's an OS fault!)
Output from install........
npm install zmq npm http GET https://registry.npmjs.org/zmq npm http 304 https://registry.npmjs.org/zmq
[email protected] preinstall /var/nodeapp/node_modules/zmq node-waf clean || (exit 0); node-waf configure build
Nothing to clean (project not configured)
Setting srcdir to : /var/nodeapp/node_modules/zmq
Setting blddir to : /var/nodeapp/node_modules/zmq/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
Checking for pkg-config version >= 0.0.0 : yes
Checking for libzmq >= 2.1.0 : yes
Checking for library uuid : yes
'configure' finished successfully (0.125s)
Waf: Entering directory /var/nodeapp/node_modules/zmq/build' [1/2] cxx: binding.cc -> build/Release/binding_1.o ../binding.cc:127:7: error: ‘uv_poll_t’ does not name a type ../binding.cc:128:35: error: ‘uv_poll_t’ has not been declared ../binding.cc:305:27: error: variable or field ‘UV_PollCallback’ declared void ../binding.cc:305:27: error: ‘uv_poll_t’ was not declared in this scope ../binding.cc:305:38: error: ‘handle’ was not declared in this scope ../binding.cc:305:46: error: expected primary-expression before ‘int’ ../binding.cc:305:58: error: expected primary-expression before ‘int’ ../binding.cc: In constructor ‘zmq::Socket::Socket(zmq::Context*, int)’: ../binding.cc:317:5: error: ‘poll_handle_’ was not declared in this scope ../binding.cc:317:24: error: expected type-specifier before ‘uv_poll_t’ ../binding.cc:317:24: error: expected ‘;’ before ‘uv_poll_t’ ../binding.cc:321:5: error: ‘uv_os_sock_t’ was not declared in this scope ../binding.cc:321:18: error: expected ‘;’ before ‘socket’ ../binding.cc:324:50: error: invalid conversion from ‘int (*)(int, int, int)throw ()’ to ‘void*’ [-fpermissive] /usr/include/zmq.h:223:16: error: initializing argument 3 of ‘int zmq_getsockopt(void*, int, void*, size_t*)’ [-fpermissive] ../binding.cc:325:64: error: ‘uv_poll_init_socket’ was not declared in this scope ../binding.cc:326:33: error: ‘UV_READABLE’ was not declared in this scope ../binding.cc:326:69: error: ‘uv_poll_start’ was not declared in this scope ../binding.cc: In member function ‘void zmq::Socket::Close()’: ../binding.cc:805:20: error: ‘poll_handle_’ was not declared in this scope ../binding.cc:805:32: error: ‘uv_poll_stop’ was not declared in this scope Waf: Leaving directory
/var/nodeapp/node_modules/zmq/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
npm ERR! error installing [email protected]
npm ERR! [email protected] preinstall: node-waf clean || (exit 0); node-waf configure build
npm ERR! sh "-c" "node-waf clean || (exit 0); node-waf configure build"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.2.0-27-generic
npm ERR! command "node" "/usr/bin/npm" "install" "zmq"
npm ERR! cwd /var/nodeapp
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] preinstall: node-waf clean || (exit 0); node-waf configure build
npm ERR! message sh "-c" "node-waf clean || (exit 0); node-waf configure build"
failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/nodeapp/npm-debug.log
npm not ok
I'm having an issue installing this as well...(already tried the mscdex fix as well)
npm http GET https://registry.npmjs.org/zmq npm http 304 https://registry.npmjs.org/zmq
[email protected] install /home/ubuntu/monitor_test/node_modules/zmq node-gyp rebuild
info it worked if it ends with ok
spawn python [ '/home/ubuntu/.node-gyp/0.6.19/tools/gyp_addon',
'binding.gyp',
'-I/home/ubuntu/monitor_test/node_modules/zmq/build/config.gypi',
'-f',
'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory /home/ubuntu/monitor_test/node_modules/zmq/build' CXX(target) Release/obj.target/binding/binding.o ../binding.cc:29:17: fatal error: zmq.h: No such file or directory compilation terminated. make: *** [Release/obj.target/binding/binding.o] Error 1 make: Leaving directory
/home/ubuntu/monitor_test/node_modules/zmq/build'
ERR! Error: make
failed with exit code: 2
at ChildProcess.onExit (/home/ubuntu/.nvm/v0.6.19/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:212:23)
at ChildProcess.emit (events.js:70:17)
at maybeExit (child_process.js:362:16)
at Process.onexit (child_process.js:398:5)
ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the zmq 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 zmq
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.0.0-17-virtual
npm ERR! command "node" "/home/ubuntu/.nvm/v0.6.19/bin/npm" "install" "zmq"
npm ERR! cwd /home/ubuntu/monitor_test
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.24
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: node-gyp rebuild
npm ERR! message sh "-c" "node-gyp rebuild"
failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/monitor_test/npm-debug.log
npm not ok
npm not ok
I have the same problem, the following is what I did to get it going:
- Download zeromq-2.2.0, complie and install under //usr/local. If you have zeromq already installed on your system you don't need this step
- Download latest version of zeromq.node (zeromq.node-2.0.3-33) from here and untar under /tmp/zeromq.node-2.0.3-33
- Change to /tmp/zeromq.node-2.0.3-33
- Add the location of installed zeromq include and library dir to Makefile: CFLAGS = -I /usr/local/zmq/include CXXFLAGS = -I /usr/local/zmq/include LDFLAGS = -L /usr/local/zmq/lib I am not sure if I need CXXFLAGS!
- Now change to dir where you want to instal zmq node module and type the following: npm install /tmp/zeromq.node-2.0.3-33
The above resulted in the installation of node module: [email protected]
same problem,I tried you steps but It doesn't help ... anybody else resolve the problem?
Ubuntu 12.04 LTS, the npm install https://github.com/mscdex/zeromq.node/tarball/master did not work either.
304 info postuninstall [email protected]
305 error [email protected] install: node-gyp rebuild
305 error sh "-c" "node-gyp rebuild"
failed with 1
306 error Failed at the [email protected] install script.
306 error This is most likely a problem with the zmq package,
306 error not with npm itself.
306 error Tell the author that this fails on your system:
306 error node-gyp rebuild
306 error You can get their info via:
306 error npm owner ls zmq
306 error There is likely additional logging output above.
307 error System Linux 2.6.32-45-generic
308 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/mscdex/zeromq.node/tarball/master"
309 error cwd /home/fosstechlab/nodejs
310 error node -v v0.8.15
311 error npm -v 1.1.66
312 error code ELIFECYCLE
313 verbose exit [ 1, true ]
@tapin13 what version of libzmq-dev you have? I've just installed by this manual: http://johanharjono.com/archives/633 and it works well. See comments there as well.
after step
edit: Whichever language you want to use, you need to first add Chris Lea‘s zeromq ppa:
sudo add-apt-repository ppa:chris-lea/zeromq sudo apt-get update
Python
If you are planning to use Python to work with ZeroMQ then you can install it simply by running
sudo apt-get install python-zeromq
*fosstechlab@eyalvmubuntulocal:~/nodejs/appp$ sudo apt-get install python-zeromq Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package python-zeromq * Ruby
For Rubyists, run
sudo apt-get install zeromq-bin libzmq-dbg libzmq-dev libzmq0
*fosstechlab@eyalvmubuntulocal:~/nodejs/appp$ sudo apt-get install zeromq-bin libzmq-dbg libzmq-dev libzmq0 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies: libzmq-dbg: Depends: libzmq1 (= 2.2.0-1chl1~lucid1) but it is not going to be installed libzmq-dev: Depends: libzmq1 (= 2.2.0-1chl1~lucid1) but it is not going to be installed E: Broken packages fosstechlab@eyalvmubuntulocal:~/nodejs/appp$ *
On Tue, Nov 27, 2012 at 2:11 PM, Alexey Kupershtokh < [email protected]> wrote:
what version of libzmq-dev you have? I've just installed by this manual: http://johanharjono.com/archives/633and it works well. See comments there as well.
— Reply to this email directly or view it on GitHub.
try this as well:
sudo add-apt-repository ppa:chris-lea/libpgm
sudo apt-get update
sudo apt-get install libzmq-dev
libpgm is a dependency for libzmq
thx, after some google search work I install it :)
@tapin13 How did you fix the issue?
@Janeml It's not really explained in the readme, but you need to build/install ZMQ on your system first. These are just bindings and they expect ZMQ to be installed (needs libs and headers)
On Ubuntu Server 12.04 LTS I did the following:
- Make sure you have the following packages installed (sudo apt-get install binutils libtool autoconf automake)
- Get the latest POSIX tarball (http://zeromq.org/intro:get-the-software) and untar it
- Run configure (./configure)
- Run make (sudo make install)
- npm install zmq or npm update if you already have it listed in your package.json
- sudo ldconfig (otherwise you might get the error "connot open shared object file")
Or if you don't have root access, download zeromq 3.2.4, install with configure --prefix, then export CXXFLAGS and LDFLAGS. See below. Could the npm installer could do this for the user if zmq isn't installed?
wget http://download.zeromq.org/zeromq-3.2.4.tar.gz tar -xf zeromq-3.2.4.tar.gz cd zeromq-3.2.4 ./configure --prefix=$(readlink -f ..) make && make install export CXXFLAGS="-I $(readlink -f ../include)" export LDFLAGS="-L $(readlink -f ../lib) -Wl,-rpath=$(readlink -f ../lib)" npm install zmq
@rgeary1 Thanks! Worked fine on Ubuntu 10.04.4 LTS.
@rgeary1 - Thanks, your solution worked on CentOS 6.5
Any chance @rgeary1 could update the wiki with added installation instructions?
Sure, done. https://github.com/JustinTulloss/zeromq.node/wiki/Installation
Thanks!