Kurt
Posts: 5
Joined: Sat Apr 14, 2012 1:30 pm
Contact: Website

cpan installing

Tue Nov 13, 2012 8:50 pm

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

BlackJack
Posts: 288
Joined: Sat Aug 04, 2012 8:28 am
Contact: Website

Re: cpan installing

Wed Nov 14, 2012 9:00 am

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`.

Code: Select all

while not self.asleep():
    sheep += 1

Kurt
Posts: 5
Joined: Sat Apr 14, 2012 1:30 pm
Contact: Website

Re: cpan installing

Wed Nov 14, 2012 6:42 pm

sorry, I'm using Raspbian “wheezy” image. How do I install the one you mentioned? - from cpan or via apt-get?

BlackJack
Posts: 288
Joined: Sat Aug 04, 2012 8:28 am
Contact: Website

Re: cpan installing

Wed Nov 14, 2012 7:28 pm

@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.

Code: Select all

while not self.asleep():
    sheep += 1

Kurt
Posts: 5
Joined: Sat Apr 14, 2012 1:30 pm
Contact: Website

Re: cpan installing

Fri Nov 16, 2012 8:33 pm

Great it works!
A bit confusing when to use "cpanm" or when to use "apt-get". But yes it's ok now!!!!

/Kurt

wallasey
Posts: 25
Joined: Fri Nov 16, 2012 5:10 pm

Re: cpan installing

Wed Nov 21, 2012 12:40 am

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)

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 2 guests