Page 1 of 1

cpan installing

Posted: Tue Nov 13, 2012 8:50 pm
by Kurt
I'm trying to install Perl modules form cpan, specific the GD modules. I always get an error messages:

*UNRECOVERABLE ERROR**
Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.

Any idear on where I get libgd? - it's not on my pi

/Kurt

Re: cpan installing

Posted: Wed Nov 14, 2012 9:00 am
by BlackJack
Which operating system are you running on your Raspi? I would expect the GD library and the Perl bindings for it to be in the package system of every decent Linux distribution. On Debian Wheezy the package is called `libgd-gd2-perl`.

Re: cpan installing

Posted: Wed Nov 14, 2012 6:42 pm
by Kurt
sorry, I'm using Raspbian “wheezy” image. How do I install the one you mentioned? - from cpan or via apt-get?

Re: cpan installing

Posted: Wed Nov 14, 2012 7:28 pm
by BlackJack
@Kurt: The Debian package I mentioned with ``apt-get`` (command line), or ``aptitude`` (still console but ”full screen user interface”), or ``synaptic`` (GUI application). If something can be installed with the package system of the Linux distribution I would prefer this over other ways unless there is a compelling reason.

Re: cpan installing

Posted: Fri Nov 16, 2012 8:33 pm
by Kurt
Great it works!
A bit confusing when to use "cpanm" or when to use "apt-get". But yes it's ok now!!!!

/Kurt

Re: cpan installing

Posted: Wed Nov 21, 2012 12:40 am
by wallasey
Kurt wrote:Great it works!
A bit confusing when to use "cpanm" or when to use "apt-get". But yes it's ok now!!!!

/Kurt
For the default system Perl, always use apt-get. Installing modules using a CPAN client to a Perl managed by a package system is likely to cause you grief sooner or later. (You'll break package dependencies etc.)

If you had a separate Perl to use a CPAN client with - problems with failing modules can often be resolved by checking how the debian packager built the module. In the case of module GD for wheezy / armhf you will find patches for Makefile.PL , and test files. Applying these to the source for GD makes a build from source work.

(A side note - probably covered elsewhere - if you build your own Perl you need to configure to use gcc-4.7)