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

Hi all,

I'm at an impasse trying to install the Gtk2 package on my OS X machine. sudo cpan, then: intsall Gtk2 results in:

---- Unsatisfied dependencies detected during ---- ---- XAOC/Gtk2-1.242.tar.gz ---- Pango [build_requires] Glib [build_requires] Cairo [build_requires]
When I try to install any of the above dependencies, the install fails with this same message (substitute the package name):
CPAN.pm: Building X/XA/XAOC/Cairo-1.090.tar.gz 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 58 *** 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 58
and it's all an evil downhill spiral from here. Any ideas? Cheers - Balt

Replies are listed 'Best First'.
Re: Gtk2 installation on OS X fails
by brx (Pilgrim) on Apr 19, 2012 at 07:04 UTC
    On macosx, my usual approach with opensource projects is (in this order):
    1. Use binary distribution or installation procedure from the project site. For your problem: Re: Gtk2 installation on OS X fails
    2. If there is nothing for macosx on the project site, I use the Macports package http://www.macports.org/install.php (check the freshness of the package)
    3. Finally, I try to compile (or use cpan...) myself and I fail :-)
Re: Gtk2 installation on OS X fails
by Anonymous Monk on Apr 19, 2012 at 05:23 UTC