node-curl icon indicating copy to clipboard operation
node-curl copied to clipboard

npm install error

Open inadarei opened this issue 12 years ago • 10 comments

Got following error when trying to run npm install on Ubuntu

> sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)

extract constants from 
generate src/integer_options.h
cat: : No such file or directory
generate src/string_options.h
cat: : No such file or directory
generate src/integer_infos.h
cat: : No such file or directory
generate src/string_infos.h
cat: : No such file or directory
generate src/double_infos.h
cat: : No such file or directory
make: Entering directory `/home/developer/nodescale/node_modules/node-curl/build'
  CXX(target) Release/obj.target/node-curl/src/node-curl.o
In file included from ../src/node-curl.cc:1:0:
../src/node-curl.h:7:23: fatal error: curl/curl.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/node-curl/src/node-curl.o] Error 1
make: Leaving directory `/home/developer/nodescale/node_modules/node-curl/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/developer/.nvm/v0.10.15/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.2.0-36-virtual
gyp ERR! command "node" "/home/developer/.nvm/v0.10.15/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/developer/nodescale/node_modules/node-curl
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok 
sh: 1: node-waf: not found
npm ERR! weird error 127
npm ERR! not ok code 0

The solution was to run:

> sudo apt-get install libcurl3-dev

May be worth noting in the installation instructions that libcurl-dev is required, or fixing in some other way.

cheers

inadarei avatar Aug 02 '13 01:08 inadarei

This solution worked for me as well, thanks.

ghost avatar Oct 08 '13 13:10 ghost

how about on windows?

x24padua22 avatar Dec 20 '13 02:12 x24padua22

This package is not cross-platform. On windows:

'sh' is not recognized as an internal or external command, operable program or batch file.

AnthonySteele avatar Jan 24 '14 16:01 AnthonySteele

Any way to make this work on windows?

I have bash installed, so sh works, the issue was probably about the script not finding the curl header files, I can download it from the curl project (there is a windows version in there), but it will probably fail again.

JCMais avatar Apr 15 '14 19:04 JCMais

I've added Windows support on a branch I'm working on, but keep in mind the API was changed. https://github.com/JCMais/node-libcurl/tree/develop

JCMais avatar Apr 24 '14 19:04 JCMais

I am getting the same error on Centos 6.4.

Have libcurl-7.19.7-37.el6_4.i686 installed. Still getting the same error. Any fix for Centos?

vivekratnavel avatar May 23 '14 18:05 vivekratnavel

I fixed it by installing libcurl-devel in Centos.

sudo yum install libcurl-devel

vivekratnavel avatar May 23 '14 18:05 vivekratnavel

@vivekratnavel This fixed my centos issue as well. Thanks for saving me a lot of time!

macinnir avatar Jan 14 '15 04:01 macinnir

This fixed it for me on CentOs sudo yum install curl-devel

luciddev avatar Apr 10 '15 00:04 luciddev

After using the above solution of libcurl3-dev in my Ubuntu 14.04 box, now I'm having this error

> [email protected] install /home/dipesh/Documents/Projects/voym/node_modules/node-curl
> sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)

extract constants from /usr/include/curl/curl.h
generate src/integer_options.h
generate src/string_options.h
generate src/integer_infos.h
generate src/string_infos.h
generate src/double_infos.h
make: Entering directory `/home/dipesh/Documents/Projects/voym/node_modules/node-curl/build'
  CXX(target) Release/obj.target/node-curl/src/node-curl.o
make: g++: Command not found
make: *** [Release/obj.target/node-curl/src/node-curl.o] Error 127
make: Leaving directory `/home/dipesh/Documents/Projects/voym/node_modules/node-curl/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:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.13.0-49-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dipesh/Documents/Projects/voym/node_modules/node-curl
gyp ERR! node -v v0.10.38
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
sh: 1: node-waf: not found

npm ERR! [email protected] install: `sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-curl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-curl
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-49-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-curl" "--save"
npm ERR! cwd /home/dipesh/Documents/Projects/voym
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

It's resolved, thanks to @jimmygle here. The issue is with G++ so have to install it using:

sudo apt-get install build-essential g++

Dev-Dipesh avatar Apr 28 '15 23:04 Dev-Dipesh