Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

CPAN module compile error: LWP::Curl

by fireblood (Acolyte)
on Jul 19, 2017 at 21:39 UTC ( #1195528=perlquestion: print w/replies, xml ) Need Help??

fireblood has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I am trying to add LWP::Curl to my library of installed CPAN modules. When I initiate the process to fetch it and process it into my library, I see a message that says:
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
after which the process fails. I've downloaded curl both for Windows and for Cygwin directly from the source,, but have not seen the libcurl.pc file in either of them.
After doing much web searching, I've found that others have been encountering this since around 2008. However, I haven't found any posts that provide a solution.

Replies are listed 'Best First'.
Re: CPAN module compile error: LWP::Curl
by syphilis (Bishop) on Jul 19, 2017 at 23:57 UTC
    I've downloaded curl both for Windows and for Cygwin directly from the source,, but have not seen the libcurl.pc file in either of them

    You've downloaded the Curl source - but you won't get a libcurl.pc (or an actual Curl library) until that source is compiled.
    One alternative is to install a Curl library that has already been built.
    UPDATE: Correcting myself, it's possible that this is what you've already done, but that the pc file is not provided.

    Unfortunately, huck's suggestion of (sudo apt-get install libcurl3-dev) is not going to help much on Windows and Cygwin.
    For Cygwin, there should already be such a library available for installation using setup.exe.

    For Windows (Active Perl and Strawberry Perl) you can install the LWP-Curl-0.14 module via PPM:
    ppm install --force
    URI is a prerequisite. If you don't have that module installed you can install it with either:
    cpan -i URI or ppm install --force
    Installing with PPM means that you don't have to bother installing the Curl library.
    LWP::Curl PPM packages for perl-5.26 have not yet been built and uploaded, but I can rectify that fairly smartly if necessary.

    If you really want to build the module yourself, start with installing the Curl library, and set the PKG_CONFIG_PATH environment variable to the location of libcurl.pc.
    And get back to us with any issues that arise.

Re: CPAN module compile error: LWP::Curl
by huck (Parson) on Jul 19, 2017 at 21:52 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1195528]
Approved by beech
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2020-03-28 15:46 GMT
Find Nodes?
    Voting Booth?
    To "Disagree to disagree" means to:

    Results (167 votes). Check out past polls.