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

Error: `make` failed with exit code: 2

Open betweenbrain opened this issue 11 years ago • 13 comments
trafficstars

Below is what I can ascertain as the relevant information. Please let me know if you need any further details.

stack Error: `make` failed with exit code: 2
stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
stack     at ChildProcess.emit (events.js:98:17)
stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
System Linux 3.2.0-69-generic
command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
cwd /home/mthomas/node_modules/node-curl
node -v v0.10.32
node-gyp -v v1.0.1
not ok 
sh: 1: node-waf: not found

[email protected] install: `sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)`
Exit status 127

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

betweenbrain avatar Oct 06 '14 18:10 betweenbrain

Try running this (from here):

sudo apt-get install libcurl3-dev

jimmygle avatar Oct 13 '14 15:10 jimmygle

I'm also having the same 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

First I have the error stated in the solution link you shared, and used that solution. Now after that I'm having this above error. Tried everything, please help me out in this. I'm using an Ubuntu 14.04 machine.

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

Looks like maybe g++ isn't installed? A quick Google found this.

Try:

sudo apt-get install build-essential g++

jimmygle avatar Apr 28 '15 23:04 jimmygle

That's awesome, thanks a lot! You are right it's the G++ as stated command not found.

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

Is there a solution for this on OSX?

connor11528 avatar Oct 14 '15 20:10 connor11528

face same issue with osx.

ghost avatar Oct 15 '15 09:10 ghost

@jimmygle fixed it for me with (Thankyou!)

sudo apt-get install libcurl3-dev

Mikebert4 avatar Oct 21 '15 17:10 Mikebert4

sudo apt-get install build-essential g++ fixed for me. Thanks!

MarcelRobitaille avatar Dec 24 '15 03:12 MarcelRobitaille

how about on centos?I also encountered such problems, but can not be resolved through the yum

HeyMannn avatar Mar 22 '16 02:03 HeyMannn

both build-essential and g++ are newest version , still have the problem...I'm using ubuntu.

glass4pk avatar Jul 01 '16 11:07 glass4pk

This may help, I was having issues on Ubuntu 16.04 -- https://github.com/joshtronic/node-curl -- I submitted a PR but since I doubt it will get accepted you may just want to install from source:

npm install /path/to/joshtronic/node-curl

Also, was having issues with the OpenSSL version of libcurl4. Ended up swapping for the gnutls version

sudo apt-get install libcurl4-gnutls-dev

Hope this helps!!

joshtronic avatar Oct 12 '16 22:10 joshtronic

@HeyMannn Yes what about centos, i am also facing same issue.

Lalitpatadiya12 avatar Nov 28 '17 04:11 Lalitpatadiya12

@Lalitpatadiya12 node-curl is dead. See https://github.com/JCMais/node-libcurl

JCMais avatar Nov 28 '17 18:11 JCMais