Unable to install Perl GD on Debian

Space

New member
Joined
Jul 1, 2015
Messages
2
Hello,

I am unable to install Perl GD on my Debian server running DirectAdmin. I've tried installing it via the CPAN method.

PHP:
root@node:~# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v2.10)
Enter 'h' for help.

cpan[1]> install LWP
Reading '/root/.cpan/Metadata'
  Database was generated on Wed, 24 Jun 2015 16:53:24 GMT
LWP is up to date (6.13).

cpan[2]> install DBI
DBI is up to date (1.633).

cpan[3]> install DBD::mysql
DBD::mysql is up to date (4.031).

cpan[4]> install GD
Running install for module 'GD'
Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring L/LD/LDS/GD-2.56.tar.gz with Build.PL
Configuring for libgd version 2.0.36.
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
Failed during this command:
 LDS/GD-2.56.tar.gz                           : writemakefile NO '/usr/bin/perl Build.PL --installdirs site' returned status 512

I've read that there's a bug in CPAN related to this issue. https://rt.cpan.org/Public/Bug/Display.html?id=101599
If that's true, how can I go about installing Perl GD? Are there any means to verify if Perl GD is installed on the server?

Any assistance would be greatly appreciated!

Thank You!
 
Hi,

To solve this problem make sure gdlib-config in your PATH and that gdlib-config --all works. Or else, replace all the instances of prompt with Module::Build->prompt and it should work.

OR

You can try installing the GD library for Perl by below command.
apt-get install libgd-gd2-perl

Give it a try to see if resolves your issue.
 
Hello, thank you for your reply.

To solve this problem make sure gdlib-config in your PATH and that gdlib-config --all works. Or else, replace all the instances of prompt with Module::Build->prompt and it should work.

I'm not familiar with Perl and PATH stuffs, can you explain how do I go about doing what's mentioned above?

You can try installing the GD library for Perl by below command.
apt-get install libgd-gd2-perl

I've tried installing the GD library for Perl but I already have the newest version.

PHP:
root@node:~# apt-get install libgd-gd2-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgd-gd2-perl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Your assistance is greatly appreciated!

Regards
 
Back
Top