Pete
Pete

Reputation: 21

error installing WWW::Curl::Easy "Cannot build Constants" MacOS

I'm trying to install the WWW::Curl::Easy module on MacOS10.12.4 and it fails stating "Cannot find curl.h - cannot build constants file".

Curl-config in /usr/bin has an includedir of /usr/include, which does not exist. I checked the Makefile with the perl module, and it lists several other locations it looks, such as /usr/local/include, /usr/local, etc. Those didn't exist, but I made them and copied the curl.h that comes with XCode into them.

I still receive the same error. Here is the log:

cpanm (App::cpanminus) 1.7043 on perl 5.016000 built for darwin-2level
Work directory is /Users/thisUser/.cpanm/work/1493902651.14410
You have make /usr/bin/make
You have /usr/bin/curl
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching WWW::Curl::Easy () on cpanmetadb ...
--> Working on WWW::Curl::Easy
Fetching http://www.cpan.org/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz
-> OK
Unpacking WWW-Curl-4.17.tar.gz
Entering WWW-Curl-4.17
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (6.63_02)
Configuring WWW-Curl-4.17
Running Makefile.PL
Locating required external dependency bin:curl-config... found at /usr/bin/curl-config.
The version is libcurl 7.51.0
Cannot find curl.h - cannot build constants files  - see Makefile.PL at Makefile.PL line 96.
-> N/A
-> FAIL Configure failed for WWW-Curl-4.17. See /Users/thisUser/.cpanm/work/1493902651.14410/build.log for details.

I've done my best searches here and on Google, and not finding an answer. I didn't have this issue when I installed this on my last Mac, so not sure what was changed.

Upvotes: 1

Views: 1581

Answers (2)

Pete
Pete

Reputation: 21

This particular error seems to be because the XCode command line tools were not installed. I followed the instructions here: https://superuser.com/questions/995360/missing-usr-include-in-os-x-el-capitan

This still resulted in an error, but it is different and possibly unrelated to this one, so I am considering this question resolved.

Upvotes: 0

toreau
toreau

Reputation: 660

You could install Homebrew, and then install curl (brew install curl) which will help a little, but you'll probably run into compilation problems.

I'm no big fan of the WWW::Curl package, though, so might I ask what you are trying to achieve? There are way better "I want to access the interwebz"-packages out there. :)

Upvotes: 0

Related Questions