I am trying to install bcrypt using npm on redHat, I have it working on my Windows dev environment but it fails when I try to port it to the Unix test.
I am running npm intall bcrypt and recieving the following output:
$ ../../nodejs/bin/npm install bcrypt
npm WARN package.json party#0.0.0 No repository field.
npm WARN package.json party#0.0.0 No README data
-
> bcrypt#0.8.0 install /app/party/site/node_modules/bcrypt
> node-gyp rebuild
make: Entering directory `/app/party/site/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: execvp: g++: Not a directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 127
make: Leaving directory `/app/party/site/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/app/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267: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 2.6.18-371.el5
gyp ERR! command "node" "/app/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/party/site/node_modules/bcrypt
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! bcrypt#0.8.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.0 install script.
npm ERR! This is most likely a problem with the bcrypt 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 bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.18-371.el5
npm ERR! command "/app/nodejs/bin/node" "/app/nodejs/bin/npm" "install" "bcrypt"
npm ERR! cwd /app/party/site
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /app/party/site/npm-debug.log
npm ERR! not ok code 0
I have been Googling for hours, but cannot work out why this is failing - please help!
Okay, thanks, I have got this working, the version of GCC I was running did not include g++, unfortunately I do not have root on this box so had to install easybuild and then use that to install a new version of GCC, then include that version in the PATH, after that the npm install bcrypt worked perfectly.
Related
I am trying to install node-gyp, and I have this error :
I am using XCode 7.1, I tried to downgrade my version of NodeJS but it doesn't work.
I have been looking over on the internet for solutions but I cannot find any.
npm WARN package.json myk#1.0.0 No repository field.
npm WARN package.json myk#1.0.0 No README data
npm WARN package.json myk#1.0.0 No license field.
npm WARN package.json Dependency 'gulp' exists in both dependencies and devDependencies, using 'gulp#^3.5.6' from dependencies
contextify#0.1.14 install /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/node_modules/gulp-dom/node_modules/jsdom/node_modules/contextify
node-gyp rebuild
CXX(target) Release/obj.target/contextify/src/contextify.o
SOLINK_MODULE(target) Release/contextify.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/contextify.node] Error 1
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: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 Darwin 15.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/node_modules/gulp-dom/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.12.6
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/npm-debug.log
I had the same problem and what worked for Emmanuel didn't work for me. In the end, this solved my problem:
cd /usr/local/lib
sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
Originally found under this question
I found the answer :
$ npm install -g npm-check-updates
$ npm-check-updates -u
$ npm install
I've upgraded my node version from 10 to 12.7 after which my LDAP module did not work.When i tried to install the latest LDAP version i got the below error
npm install LDAP
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/ubuntu/node_modules/LDAP/.node-gyp"
make: Entering directory `/home/ubuntu/node_modules/LDAP/build'
CXX(target) Release/obj.target/LDAP/src/LDAP.o
../src/LDAP.cc:10:18: fatal error: ldap.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/LDAP/src/LDAP.o] Error 1
make: Leaving directory `/home/ubuntu/node_modules/LDAP/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/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.2.0-40-virtual
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/node_modules/LDAP
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Linux 3.2.0-40-virtual
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "LDAP"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! LDAP#1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the LDAP#1.2.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the LDAP 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 LDAP
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/npm-debug.log
and when i googled i came across the below thread
https://github.com/jeremycx/node-LDAP/issues/70
which says that The v8 C API has changed dramatically in Node.js 0.12 compared to 0.10. Unfortunately, adaptation of the code would require epic refactoring of the C codebase..
Does that mean that the LDAP module does not support in the latest node or have i missed something .... kindly help
Try this
sudo apt-get install libldap2-dev
I've been trying to install the npm package canvas all day. I ran:
sudo npm install canvas
but i get:
canvas#1.2.4 install /home/mark/Programming/canvas_npm/node_modules/canvas
node-gyp rebuild
make: Entering directory /home/mark/Programming/canvas_npm/node_modules/canvas/build' SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node COPY Release/canvas-postbuild.node CXX(target) Release/obj.target/canvas/src/Canvas.o In file included from ../src/Canvas.cc:7:0: ../src/Canvas.h:22:17: fatal error: nan.h: No such file or directory #include <nan.h> ^ compilation terminated. make: *** [Release/obj.target/canvas/src/Canvas.o] Error 1 make: Leaving directory/home/mark/Programming/canvas_npm/node_modules/canvas/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: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-37-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mark/Programming/canvas_npm/node_modules/canvas
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Linux 3.13.0-37-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! canvas#1.2.4 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#1.2.4 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the canvas 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 canvas
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/mark/Programming/canvas_npm/npm-debug.log
The specific problem causing the error appears to be:
fatal error: nan.h: No such file or directory
I have installed Cairo using homebrew. I ideas why i cannot install canvas?
My solution (for Ubuntu) was to install the nan package:
npm install nan
Then copy the nan headers to /usr/include/
sudo cp node_modules/nan/nan*.h /usr/include/
Looks like its an issue with canvas version 1.2.24. I solved by installing 1.2.23
I have run into an unusal problem when trying to install pty.js using node:
If I run npm install pty.js I receive this error:
> node-gyp rebuild
CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:487:10: error: use of undeclared identifier 'openpty'
return openpty(amaster, aslave, name, (termios *)termp, (winsize *)winp);
^
../src/unix/pty.cc:533:10: error: use of undeclared identifier 'forkpty'
return forkpty(amaster, name, (termios *)termp, (winsize *)winp);
^
2 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
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.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/otiswright/Developer/Projects/Web/Hatchway/node_modules/pty.js
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! pty.js#0.2.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js#0.2.4 install script.
npm ERR! This is most likely a problem with the pty.js 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 pty.js
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "pty.js"
npm ERR! cwd /Users/otiswright/Developer/Projects/Web/Hatchway
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.5.0-alpha-4
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/otiswright/Developer/Projects/Web/Hatchway/npm-debug.log
npm ERR! not ok code 0
I have node-gyp installed am running OS X with xcode + commandlines installed.
I am not sure where the problem is occurring? Could be dependencies.
I had the same issue with a different node package devtools-terminal.
The problem is that a header file is configured incorrectly for OSX as explained here.
This is the work around I use:
mkdir /tmp/pty.js
git clone https://github.com/chjj/pty.js.git /tmp/pty.js
vi /tmp/pty.js/src/unix/pty.cc
replace line 39: #include <util.h> with #include "/usr/include/util.h"
npm install -g /tmp/pty.js
and now npm install -g devtools-terminal should work.
This way you fix the issue in pty.js and use your local copy as the dependency for the package you with to install.
Good luck!
After installing OS X Mountain Lion and XCode, I'm getting this error:
Jonathans-MacBook-Air:fme jong$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt/0.7.0
npm http 304 https://registry.npmjs.org/bcrypt/0.7.0
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0
> bcrypt#0.7.0 install /Users/jong/Workspace/fme/node_modules/bcrypt
> node-gyp rebuild
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: c++: No such file or directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
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:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 12.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jong/Workspace/fme/node_modules/bcrypt
gyp ERR! node -v v0.8.4
gyp ERR! node-gyp -v v0.6.1
gyp ERR! not ok
npm ERR! bcrypt#0.7.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the bcrypt#0.7.0 install script.
npm ERR! This is most likely a problem with the bcrypt 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 bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /Users/jong/Workspace/fme
npm ERR! node -v v0.8.4
npm ERR! npm -v 1.1.45
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jong/Workspace/fme/npm-debug.log
npm ERR! not ok code 0
I have a feeling that it doesn't know which compiler to use. How do I fix this?
Apparently I just need to install the Command Line Tools from the downloads panel in XCode
xCode doesn't bundle command-line tools by default. Apple explains it in their documentation.
The problem may be that your Node.Js is version 0.10 and some modules only work with the previous 0.8.22 version which you can get here: http://blog.nodejs.org/2013/03/06/node-v0-8-22-stable/