Назад | Перейти на главную страницу

Не удается установить модуль Perl GD на CentOS

# cpan install GD
...
GD-2.56/lib/GD/Polyline.pm
CPAN: YAML loaded ok (v0.90)
CPAN: CPAN::Meta::Requirements loaded ok (v2.131)
CPAN: Parse::CPAN::Meta loaded ok (v1.4414)
CPAN: CPAN::Meta loaded ok (v2.143240)
CPAN: Module::CoreList loaded ok (v3.09)
CPAN: Module::Build loaded ok (v0.4205)
Configuring L/LD/LDS/GD-2.56.tar.gz with Build.PL
Configuring for libgd version 2.0.34.
Checking for stray libgd header files...none found.

Unknown option: installdirs
Usage: perl Build.PL [options]

Configure GD module.

 Options:
     -options       "JPEG,FT,PNG,GIF,XPM,ANIMGIF"   feature options, separated by commas
     -lib_gd_path   path            path to libgd
     -lib_ft_path   path            path to Freetype library
     -lib_png_path  path            path to libpng
     -lib_jpeg_path path            path to libjpeg
     -lib_xpm_path  path            path to libxpm
     -lib_zlib_path path            path to libpng
     -ignore_missing_gd             Ignore missing or old libgd installations and try to compile anyway

If no options are passed on the command line.  The program will
attempt to autoconfigure itself with the gdlib-config program (present
in GD versions 2.0.27 or later).  Otherwise it will prompt for these
values interactively.
Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
  LDS/GD-2.56.tar.gz
  /usr/bin/perl Build.PL --installdirs site -- NOT OK

CentOS 6.8, Perl 5.10.1

Если yum install perl-GD не подходит (например, потому что вы используете версию perl из SCL, которая не включает пакет GD), вы можете установить gd-devel:

yum install gd-devel
cpan install GD

должно сработать.