npm install node-curl doesn't work?

1,790 views
Skip to first unread message

bur...@gmail.com

unread,
Jan 16, 2013, 4:30:32 PM1/16/13
to nod...@googlegroups.com
This error comes up when i try to install node-curl package.

P.S: I can install any other packages.

npm http GET https://registry.npmjs.org/node-curl
npm http 304 https://registry.npmjs.org/node-curl

> node...@0.1.8 install /root/node_modules/node-curl
> 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 `/root/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 `/root/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/nodejs/npm/node_modules/node-gyp/lib/build.js:236:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 3.0.0-12-server
gyp ERR! command "node" "/usr/lib/nodejs/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/node-curl
gyp ERR! node -v v0.8.14
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok 
Setting srcdir to                        : /root/node_modules/node-curl 
Setting blddir to                        : /root/node_modules/node-curl/build 
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 node path                   : not found 
Checking for node prefix                 : ok /usr 
'configure' finished successfully (0.027s)
Waf: Entering directory `/root/node_modules/node-curl/build'
[1/2] cxx: src/node-curl.cc -> build/Release/src/node-curl_1.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.
Waf: Leaving directory `/root/node_modules/node-curl/build'
Build failed:  -> task failed (err #1): 
        {task: cxx node-curl.cc -> node-curl_1.o}
npm ERR! node...@0.1.8 install: `sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)`
npm ERR! `sh "-c" "sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)"` failed with 1
npm ERR! 
npm ERR! Failed at the node...@0.1.8 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.0.0-12-server
npm ERR! command "nodejs" "/usr/bin/npm" "install" "node-curl"
npm ERR! cwd /root
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!     /root/npm-debug.log
npm ERR! not ok code 0

Berger Kennedy FOTSO

unread,
Jan 16, 2013, 6:14:08 PM1/16/13
to nod...@googlegroups.com
Install curl first.

Or set $NODE_CURL_H to a valid path (/usr/local/include/curl/curl.h)


2013/1/16 <bur...@gmail.com>

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Arunoda Susiripala

unread,
Jan 17, 2013, 3:41:48 AM1/17/13
to nod...@googlegroups.com
Why you need curl. 
Node has good http modules. request is a good one. 
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


--
Arunoda Susiripala


Berger Kennedy FOTSO

unread,
Jan 17, 2013, 4:12:42 AM1/17/13
to nod...@googlegroups.com
useless answer.

He has a specific problem.


2013/1/17 Arunoda Susiripala <arunoda.s...@gmail.com>

mscdex

unread,
Jan 17, 2013, 4:19:55 AM1/17/13
to nodejs
On Jan 17, 3:41 am, Arunoda Susiripala <arunoda.susirip...@gmail.com>
wrote:
> Why you need curl.
> Node has good http modules. request is a good one.

+1

Burak Gürbüz

unread,
Jan 17, 2013, 7:41:58 AM1/17/13
to nod...@googlegroups.com
I tried http and node-curl. When i try to connect with http i get "{ [Error: socket hang up] code: 'ECONNRESET' }" but i never get any connection problem with node-curl. I pointed on it before that question. I asked is there any difference between http and node-curl. What do you recommend?

17 Ocak 2013 Perşembe 10:41:48 UTC+2 tarihinde Arunoda Susiripala yazdı:
Why you need curl. 

For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Arunoda Susiripala

unread,
Jan 17, 2013, 7:51:13 AM1/17/13
to nod...@googlegroups.com
Yes. He has a problem with node-curl.

But my point is node-curl is a node binding to libcurl. 
So it has to cross the javascript to C++ boundary.
And it is a cost operation.

So the better option is to use a node module instead of node-curl.

I know curl has fancy features. Try to see https://github.com/mikeal/request can suit your needs. If so use it.

Burak Gürbüz

unread,
Jan 17, 2013, 10:00:35 AM1/17/13
to nod...@googlegroups.com
Thanks. Actually the only problem is i'm having connection problem often. I'm using node-curl thats why. I don't have any connection problem.

17 Ocak 2013 Perşembe 14:51:13 UTC+2 tarihinde Arunoda Susiripala yazdı:
Why you need curl. 

For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Burak Gürbüz

unread,
Jan 17, 2013, 10:03:44 AM1/17/13
to nod...@googlegroups.com
i've been already installed curl.

On the log there are these errors below.

106 error node...@0.1.8 install: `sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)`
106 error `sh "-c" "sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)"` failed with 1
107 error Failed at the node...@0.1.8 install script.
107 error This is most likely a problem with the node-curl package,
107 error not with npm itself.
107 error Tell the author that this fails on your system:
107 error     sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)
107 error You can get their info via:
107 error     npm owner ls node-curl
107 error There is likely additional logging output above.
108 error System Linux 3.0.0-12-server
109 error command "nodejs" "/usr/bin/npm" "install" "node-curl"
110 error cwd /root
111 error node -v v0.8.14
112 error npm -v 1.1.65
113 error code ELIFECYCLE
114 verbose exit [ 1, true ]

17 Ocak 2013 Perşembe 01:14:08 UTC+2 tarihinde Berger Kennedy FOTSO yazdı:

Eric Mill

unread,
Jan 17, 2013, 4:23:43 PM1/17/13
to nod...@googlegroups.com
Maybe you want to run "sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)" and see if that gives you a more informative error message?

Murvin Lai

unread,
Jan 18, 2013, 5:51:10 PM1/18/13
to nod...@googlegroups.com
I think node-curl is good but you probably lose connection pool handling, which is managed by http.request.  For high load, I won't bet on node-curl, rather, i will use node http.request. 

Burak Gürbüz

unread,
Jan 20, 2013, 3:52:31 PM1/20/13
to nod...@googlegroups.com
I solved my problem by Arunoda Susiripala 's recommend.
I'm watching the system these couple days and i wasn't get any connection close error, i hope i won't.

Thanks to you all for answers.

17 Ocak 2013 Perşembe 14:51:13 UTC+2 tarihinde Arunoda Susiripala yazdı:
Yes. He has a problem with node-curl.
Why you need curl. 

For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
Reply all
Reply to author
Forward
0 new messages