in reply to Re^7: cpan error - module installation
in thread cpan error - module installation

cpanm (App::cpanminus) 1.7043 on perl 5.018002 built for darwin-thread +-multi-2level Work directory is /Users/my_name/.cpanm/work/1501257286.35074 You have make /usr/bin/make You have LWP 6.05 You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3 You have /usr/bin/unzip Searching ExtUtils::PkgConfig () on cpanmetadb ... --> Working on ExtUtils::PkgConfig Fetching http://www.cpan.org/authors/id/X/XA/XAOC/ExtUtils-PkgConfig-1 +.16.tar.gz -> OK Unpacking ExtUtils-PkgConfig-1.16.tar.gz Entering ExtUtils-PkgConfig-1.16 Checking configure dependencies from META.json Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.30) Configuring ExtUtils-PkgConfig-1.16 Running Makefile.PL *** *** ExtUtils::PkgConfig requires the pkg-config utility, but it doesn' +t *** seem to be in your PATH. Is it correctly installed? *** PATH=/Users/my_name/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/s +bin:/sbin:/Library/TeX/texbin *** -> N/A -> FAIL Configure failed for ExtUtils-PkgConfig-1.16. See /Users/my_na +me/.cpanm/work/1501257286.35074/build.log for details.

Replies are listed 'Best First'.
Re^9: cpan error - module installation
by marto (Cardinal) on Jul 28, 2017 at 16:34 UTC

    The reason for failure is clear:

    ExtUtils::PkgConfig requires the pkg-config utility, but it doesn't se +em to be in your PATH. Is it correctly installed?

    ExtUtils::PkgConfig is an interface to a program called pkg-config, which doesn't seem to be available on your system, or isn't in anywhere in your PATH environment variable. Either add the installed location to your PATH variable, or install the software if you don't already have it. See brew.sh, then from the command line:

    brew install pkg-config
      Okay,  bre install pkg-config worked.

      Then the installation of ExtUtils::PkgConfig also worked, so I tried to finally install the package that I actually want, namely "GD". By typing in  cpanm GD I got the message configuring GD-2.66 ... N/A

      configure failed

      log file:

      cpanm (App::cpanminus) 1.7043 on perl 5.018002 built for darwin-thread +-multi-2level Work directory is /Users/my_name/.cpanm/work/1501260780.37428 You have make /usr/bin/make You have LWP 6.05 You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3 You have /usr/bin/unzip Searching GD () on cpanmetadb ... --> Working on GD Fetching http://www.cpan.org/authors/id/R/RU/RURBAN/GD-2.66.tar.gz -> OK Unpacking GD-2.66.tar.gz Entering GD-2.66 Checking configure dependencies from META.json Checking if you have ExtUtils::PkgConfig 0 ... Yes (1.16) Checking if you have ExtUtils::Constant 0.22 ... Yes (0.23) Configuring GD-2.66 Running Makefile.PL Notice: Type perl Makefile.PL -h for command-line option summary. Package gdlib was not found in the pkg-config search path. Perhaps you should add the directory containing `gdlib.pc' to the PKG_CONFIG_PATH environment variable No package 'gdlib' found at Makefile.PL line 441. *** can not find package gdlib *** check that it is properly installed and available in PKG_CONFIG_PA +TH at Makefile.PL line 441. -> N/A -> FAIL Configure failed for GD-2.66. See /Users/my_name/.cpanm/work/1 +501260780.37428/build.log for details.
        Package gdlib was not found in the pkg-config search path. Perhaps you should add the directory containing `gdlib.pc' to the PKG_CONFIG_PATH environment variable No package 'gdlib' found

        Same as last time, satisfy the modules dependencies. When installing modules read the documentation. The GD README tells you what is required.