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
gdlib-config --alland I get an output that doesn't look like an error. I interpret this as: 1.gdlib-configis somewhere in my path; 2.gdlib-config --allworks. But stillcpan install GDreturns "NOT OK" and then quits. – Hubert Schölnast Sep 28 '15 at 11:38gdlib-config --allandcpan install GDfails. The problem is:Build.PL is using prompt() as a function, MakeMaker style. In Module::Build, prompt is a class or object method. See Module::Build::API.– A.B. Sep 28 '15 at 11:41prompt(byModule::Build->prompt(? Did I understand you correct? – Hubert Schölnast Sep 28 '15 at 11:50find / -name "Build.pl"returns nothing. Looks like there is no Build.pl on my computer. EDIT: But there 8 versions ofBuilt.PL(with uppercase PL) – Hubert Schölnast Sep 28 '15 at 11:53cpan install GDwants to call the moduleBuild.PLfrom the directory/usr/bin/perl. But non of my 8 versions of Build.PL is there. They are in 8 different subdirectories of/root/.cpan/build/and none of them is executable. – Hubert Schölnast Sep 28 '15 at 12:12Build.PLisn't executable, it's called viaperl Build.PL– A.B. Sep 28 '15 at 12:16perl Build.PL, this created - without prompting me - a new scriptBuild. I then calledperl Build, and now GD seems to be installed. I can use GD within my own perl-scripts now. – Hubert Schölnast Sep 28 '15 at 12:33Build.PLin question is not a program installed on your computer, it's part of the GD.pm source tree. It's Perl's equivalent toConfigure. It doesn't have to be executable. It'll be something like.cpan/build/GD-2.56/Build.PL. – Schwern Sep 28 '15 at 19:08