hashlib icon indicating copy to clipboard operation
hashlib copied to clipboard

NPM not working.. How to install?

Open ghost opened this issue 12 years ago • 8 comments

NPM not working.. How to install?

ghost avatar Mar 25 '12 15:03 ghost

wow that is a bad bug report. I would hate to get one like that. Anyway, I also have an issue install hashlib with npm.

I'm trying to install 'webshell', which relies on hashlib. The hashlib dependency fails, however. If I try to do the manual install (following the instructions in the readme) it does work, but npm isn't aware of it and tries to install the (failing) hashlib dependency anywhay. Here is the output I'm getting:

npm http GET https://registry.npmjs.org/hashlib
npm http 304 https://registry.npmjs.org/hashlib

> [email protected] preinstall /Users/evert/code/fruux/dav/node_modules/hashlib
> node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured)
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 program gcc or cc           : /usr/bin/gcc 
Checking for gcc                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local/Cellar/node/0.6.14 
'configure' finished successfully (0.071s)
Waf: Entering directory `/Users/evert/code/fruux/dav/node_modules/hashlib/build'
[1/6] cc: libhash/md4c.c -> build/Release/libhash/md4c_1.o
[2/6] cc: libhash/md5c.c -> build/Release/libhash/md5c_1.o
[3/6] cc: libhash/sha0c.c -> build/Release/libhash/sha0c_1.o
[4/6] cxx: hashlib.cc -> build/Release/hashlib_2.o
../hashlib.cc:14:16: error: ev.h: No such file or directory
../hashlib.cc:15:17: error: eio.h: No such file or directory
../hashlib.cc:311: error: ‘eio_req’ was not declared in this scope
../hashlib.cc:311: error: ‘req’ was not declared in this scope
../hashlib.cc:312: error: expected ‘,’ or ‘;’ before ‘{’ token
Waf: Leaving directory `/Users/evert/code/fruux/dav/node_modules/hashlib/build'
Build failed:  -> task failed (err #1): 
    {task: cxx hashlib.cc -> hashlib_2.o}

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 hashlib 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 hashlib
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "hashlib"
npm ERR! cwd /Users/evert/code/fruux/dav
npm ERR! node -v v0.6.14
npm ERR! npm -v 1.1.9
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!     /Users/evert/code/fruux/dav/npm-debug.log
npm not ok```

evert avatar Apr 02 '12 20:04 evert

Getting the same issue with Node v0.6.15 on both CentOS 5.8 and Fedora 16. Here's my trace:

[root@localhost node]# npm install hashlib
npm http GET https://registry.npmjs.org/hashlib
npm http 304 https://registry.npmjs.org/hashlib

> [email protected] preinstall /root/node/node_modules/hashlib
> node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured)
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 program gcc or cc           : /usr/bin/gcc 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for gcc                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr 
'configure' finished successfully (0.081s)
Waf: Entering directory `/root/node/node_modules/hashlib/build'
[1/6] cc: libhash/md4c.c -> build/Release/libhash/md4c_1.o
[2/6] cc: libhash/md5c.c -> build/Release/libhash/md5c_1.o
[3/6] cc: libhash/sha0c.c -> build/Release/libhash/sha0c_1.o
[4/6] cxx: hashlib.cc -> build/Release/hashlib_2.o
../hashlib.cc:14:16: error: ev.h: No such file or directory
../hashlib.cc:15:17: error: eio.h: No such file or directory
../hashlib.cc:311: error: ‘eio_req’ was not declared in this scope
../hashlib.cc:311: error: ‘req’ was not declared in this scope
../hashlib.cc:312: error: expected ‘,’ or ‘;’ before ‘{’ token
Waf: Leaving directory `/root/node/node_modules/hashlib/build'
Build failed:  -> task failed (err #1): 
        {task: cxx hashlib.cc -> hashlib_2.o}

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 hashlib 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 hashlib
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 2.6.18-274.18.1.el5
npm ERR! command "nodejs" "/usr/bin/npm" "install" "hashlib"
npm ERR! cwd /root/node
npm ERR! node -v v0.6.15
npm ERR! npm -v 1.1.18
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!     /root/node/npm-debug.log
npm not ok

ssokol1971 avatar Apr 23 '12 21:04 ssokol1971

bump

mcameron avatar May 08 '12 13:05 mcameron

Getting similar on OSX sudoed, when installing as a dependency for: https://github.com/zsolt/retwis-nodejs

Log: npm ERR! Failed at the [email protected] preinstall script. npm ERR! This is most likely a problem with the hashlib 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 hashlib npm ERR! There is likely additional logging output above. npm ERR! npm ERR! System Darwin 10.8.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "hashlib" npm ERR! cwd /Users/[un] npm ERR! node -v v0.6.15 npm ERR! npm -v 1.1.16 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 {}

Any update on this, as performant hashing is pretty important.

lukebrowell avatar May 23 '12 20:05 lukebrowell

Same on last ubuntu:

npm http GET https://registry.npmjs.org/hashlib
npm http 200 https://registry.npmjs.org/hashlib
npm http GET https://registry.npmjs.org/hashlib/-/hashlib-1.0.1.tgz
npm http 200 https://registry.npmjs.org/hashlib/-/hashlib-1.0.1.tgz

> [email protected] install /home/suor/projects/smshub/node_modules/hashlib
> node-waf clean ; node-waf configure build

Nothing to clean (project not configured)
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 program gcc or cc           : /usr/bin/gcc 
Checking for gcc                         : ok  
Checking for node path                   : ok /home/suor/.node_libraries 
Checking for node prefix                 : ok /home/suor/nvm/v0.8.14 
'configure' finished successfully (0.120s)
Waf: Entering directory `/home/suor/projects/smshub/node_modules/hashlib/build'
[1/6] cc: libhash/md4c.c -> build/Release/libhash/md4c_1.o
[2/6] cc: libhash/md5c.c -> build/Release/libhash/md5c_1.o
[3/6] cc: libhash/sha0c.c -> build/Release/libhash/sha0c_1.o
[4/6] cxx: hashlib.cc -> build/Release/hashlib_2.o
../hashlib.cc:14:16: фатальная ошибка: ev.h: Нет такого файла или каталога
компиляция прервана.
Waf: Leaving directory `/home/suor/projects/smshub/node_modules/hashlib/build'
Build failed:  -> task failed (err #1): 
    {task: cxx hashlib.cc -> hashlib_2.o}
npm ERR! [email protected] install: `node-waf clean ; node-waf configure build`
npm ERR! `sh "-c" "node-waf clean ; node-waf configure build"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the hashlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean ; node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls hashlib
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.5.0-18-generic
npm ERR! command "/home/suor/nvm/v0.8.14/bin/node" "/home/suor/nvm/v0.8.14/bin/npm" "install" "hashlib"
npm ERR! cwd /home/suor/projects/smshub
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/suor/projects/smshub/npm-debug.log
npm ERR! not ok code 0

Suor avatar Nov 08 '12 02:11 Suor

TEH SAEM!111

trollfred avatar Aug 27 '14 14:08 trollfred

I have the same problem, maybe it is because node-waf is an external tool that now is deprecated. can you please try to use node-gyp ?

fprivitera avatar Mar 26 '15 09:03 fprivitera

sorry, have no time to support it at the moment

brainpicture avatar Mar 26 '15 09:03 brainpicture