I use npm install node-gyp and it run well , but when I use npm to install zmq, the node-gyp rebuild fail and the error below. I need the /zmq/build for my program to run.
I try reinstall the node-gyp but didn't work. Is anyone met this situation before?
zmq#2.15.3 install /lib/jinteki/netrunner/node_modules/zmq
node-gyp rebuild
make: Entering directory `/lib/jinteki/netrunner/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 `/lib/jinteki/netrunner/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/local/lib/node_modules
/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:204:12)
gyp ERR! System Linux 3.13.0-86-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules
/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /lib/jinteki/netrunner/node_modules/zmq
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
You don't have the appropriate zeromq library headers installed. The name of the package that provides these headers varies depending on your platform/distro. See the zmq readme for complete installation instructions.
Related
When I run npm install I see following error, I am running Angular app
> strong-ursa#0.10.1 install C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa
> node-gyp rebuild
C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa>if not defined npm_config_node_gyp (node "C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
ursaNative.cc
win_delay_load_hook.cc
c:\ansysdev\licensingexternal\node_modules\strong-ursa\src\ursanative.cc(484): warning C4244: 'argument': conversion from 'ssize_t' to 'i
nt', possible loss of data [C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa\build\ursaNative.vcxproj]
c:\ansysdev\licensingexternal\node_modules\strong-ursa\src\ursanative.cc(504): warning C4244: 'argument': conversion from 'ssize_t' to 'i
nt', possible loss of data [C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\ANSYSDev\LicensingExternal\node_modules\strong
-ursa\build\ursaNative.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\cygwin64\\home\\kjeeva\\ANSYSDev\\Licensing194\\LicensingPortalInternal\\node\\node-v8.12.0-win-x64\\node.exe" "C:\\cygwin64\\home\\kjeeva\\ANSYSDev\\Licensing194\\LicensingPortalInternal\\node\\node-v8.12.0-win-x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
I am not sure what to do with this error
I have to use node-usb in electron.atom to use that I am trying to install node-gyp and I am facing a Issue.
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Name\AppData\Roamin
g\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_proces
s.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\name\\
AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\Name\Desktop\electron-quick-start
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
I found few same tickets on stackoverflow I have tried them all. Still No success.
Has anyone found any solution for this problem.
I suggest that you narrow down the possible causes to the failure by following the steps in this Github Issue from node-gyp:
xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools
Hope this helps.
I am using redhat5.9. I found the 'make' related exception. I am wondering what are they making? I think they are just javascript relatd stuff.
[root#xxxx bin]# npm install -g sinopia --python=/usr/local/clo/ven/python-2.7.11/bin/python
> crypt3#0.1.8 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/.node-gyp"
make: Entering directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/build'
CXX(target) Release/obj.target/crypt3/crypt3.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *** [Release/obj.target/crypt3/crypt3.o] Error 1
make: Leaving directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.18-406.el5
gyp ERR! command "/usr/local/clo/ven/node-v4.2.3-linux-x64/bin/node" "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
> fs-ext#0.4.5 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext
> node-gyp configure build
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/.node-gyp"
make: Entering directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/build'
CXX(target) Release/obj.target/fs-ext/fs-ext.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *** [Release/obj.target/fs-ext/fs-ext.o] Error 1
make: Leaving directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.18-406.el5
gyp ERR! command "/usr/local/clo/ven/node-v4.2.3-linux-x64/bin/node" "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing crypt3#0.1.8
npm WARN optional dep failed, continuing fs-ext#0.4.5
-
> dtrace-provider#0.4.0 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js
First install gyp globally using sudo, then install module
sudo npm install -g gyp
sudo npm install /your module/
I just tried to create basic chat application using the following instructionhttp://socket.io/get-started/chat/.
When i tried to run npm install --save socket.io
I am getting the following error. How can solve the following error:
npm WARN package.json socket-chat-example#0.0.1 No repository field.
npm WARN package.json socket-chat-example#0.0.1 No README data
npm WARN package.json socket-chat-example#0.0.1 No license field.
> bufferutil#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: g++: Command not found
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/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:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
cwd /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
> utf-8-validate#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
make: g++: Command not found
make: *** [Release/obj.target/validation/src/validation.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/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:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil#1.2.1
> utf-8-validate#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
make: g++: Command not found
make: *** [Release/obj.target/validation/src/validation.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/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:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
> bufferutil#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: g++: Command not found
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/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:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm WARN optional dep failed, continuing bufferutil#1.2.1
socket.io#1.3.7 node_modules/socket.io
├── has-binary-data#0.1.3 (isarray#0.0.1)
├── debug#2.1.0 (ms#0.6.2)
├── socket.io-parser#2.2.4 (isarray#0.0.1, debug#0.7.4, component-emitter#1.1.2, benchmark#1.0.0, json3#3.2.6)
├── socket.io-adapter#0.3.1 (object-keys#1.0.1, debug#1.0.2, socket.io-parser#2.2.2)
├── engine.io#1.5.4 (base64id#0.1.0, debug#1.0.3, engine.io-parser#1.2.2, ws#0.8.0)
└── socket.io-client#1.3.7 (to-array#0.1.3, indexof#0.0.1, component-bind#1.0.0, debug#0.7.4, backo2#1.0.2, object-component#0.0.3, component-emitter#1.1.2, has-binary#0.1.6, parseuri#0.0.2, engine.io-client#1.5.4)
Please check this error and what is causing issue?
Please suggest
have you tried installing node-gyp and g++?
npm install -g node-gyp
and g++
apt-get install g++
I am trying to implement a requirement on node-xmpp-server, but i am facing issue while installing this module. I have read the blog on how to install and read few other blog posts too, but nothing is helping me out.
When I am trying to use npm install with the dependency mentioned in package.json or if I explicitly install the module, i am getting following error:
> node-stringprep#0.5.2 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1071:5)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! node-stringprep#0.5.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-stringprep#0.5.2 install script.
npm ERR! This is most likely a problem with the node-stringprep 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 node-stringprep
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-xmpp-server"
npm ERR! cwd /home/gaurav/NodeOffcRepo/chatPro
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
|
> node-expat#2.3.1 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Socket.<anonymous> (child_process.js:1167:11)
gyp ERR! stack at Socket.emit (events.js:107:17)
gyp ERR! stack at Pipe.close (net.js:461:12)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gaurav/NodeOffcRepo/chatPro/npm-debug.log
npm ERR! not ok code 0
My node version is: v0.13.0-pre
If some more info is needed, please comment.
Check if the dependencies of node-xmpp module is installed.
Try to see node xmpp documentation
You need to install first node-expat which is dependent of libexpat library. I tried
yum install libexpat
but it does not exist. I was able to find another library which helps.
Try:
(for CentOS)
yum install libicu-devel
(for Debian 6 system)
apt-get install libicu-dev
Then
npm install node-expat
Then you can install node-xmpp module.