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

Greetings Monks - I'm hoping to benefit from your wisdom.

While trying to install module Chart::Clicker, we get the following error with Cairo:

Package cairo was not found in the pkg-config search path. Perhaps you should add the directory containing `cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found at Makefile.PL line 99 *** can not find package cairo >= 1.0.0 *** check that it is properly installed and available in PKG_CONFIG_PA +TH at Makefile.PL line 99

I'm confused by what I'm seeing. Is this saying Cairo (upper case) can't install because 'cairo' (lower case) can't be found? pkg-config doco didn't help much - does it want me to create the .pc file based upon what's README says?

I had no issue installing this module on a linux box using CPAN (the above is occurring under UNIX). PERL 5.14.2, BTW.

This also bombs when attempting automated CPAN install.

Replies are listed 'Best First'.
Re: Module install issue - Cairo
by syphilis (Archbishop) on Jun 08, 2013 at 09:23 UTC
    Is this saying Cairo (upper case) can't install because 'cairo' (lower case) can't be found?

    That's correct - 'cairo' (lower case) is the C library that needs to be found.

    does it want me to create the .pc file

    No - the .pc file will be created when 'cairo' is installed.
    If it's just a problem of pkg-config not knowing where this .pc file is located, set the PKG_CONFIG_PATH environment variable to its location.

    Cheers,
    Rob

      Thanks for the replies - they were helpful.

      Unfortunately, I have another issue. I decided to install Cairo, manually, in a non-standard location - ~/lib. When trying to create the makefile, I got an expected dependency error (I want to take all the steps). After installing that dependency (ExtUtils-Depends) then trying the MakeMaker step for Cairo again, I get the same dependency error.

      Prior to this I made sure @INC had ~/lib as the first entry.

      What confuses me is that the dependency is not only at that location, it's at others along @INC. Apparently this works differently than I think.

      Please help!

        ...

        You did what? Did you export PERL5LIB=extra:inc:paths?

Re: Module install issue - Cairo (libcairo)
by Anonymous Monk on Jun 07, 2013 at 18:19 UTC