Since I failed to install Image::Magick on my non-GUI Ubuntu server Ubuntu 14.04.2 LTS (read about it here), I tried to install another image-manupulation tool that can be used from a perl-script: GD. But I also failed to install it:
~# cpan install GD
Reading '/root/.cpan/Metadata'
Database was generated on Thu, 21 May 2015 22:17:02 GMT
Running install for module 'GD'
Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok
Configuring L/LD/LDS/GD-2.56.tar.gz with Build.PL
Configuring for libgd version 2.1.1-dev@.
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
I think the problem starts with Checking for stray libgd header files...none found.
, but I have no idea what i did wrong, or what I could do to make it better.
Please help!!
supplement (2015-09-02)
I've got the hint to install libgd-gd2-perl (See answer from chicks):
apt-get install libgd-gd2-perl
I followed this instruction (as root), but it did change nothing at all. When I executed cpan install GD
I've got exactly the same messages as listed above.
supplement (2015-09-28)
Another hint was to install libgd-perl:
apt-get install libgd-perl
When I did, the previous installed package libgd-gd2-perl
was automatically removed. After the installation has finished, I tried to install GD with the command
cpan install GD
And at the end I did get exactly the same error message as in May and as three weeks ago:
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
Best Answer
It's a known and open bug, read here, and I can reproduce this error.
I have copied the following from here, all credits go to @Schwern.
And here is the problematic code in
Build.pl
and here
and so on.