What package provides gdlib-config in your distribution?

I just tried to install GD from CPAN. It complained that gdlib-config is missing and that I should install libgd.
After some search I found out that in Ubuntu gdlib-config is provided by libgd2-xpm-dev and not by libgd.

So I am sending a patch to Lincol Stein to have a better error message, but it would be nice if I could included the names of the correct packages from other Linux distributions.

Hence the question.

What package provides gdlib-config in your distribution?

13 Comments

On FreeBSD, it's installed by the graphics/gd port.

Hi Gabor

It's also libgd2-xpm-dev under Debian, which is not surprising.

Mandriva has it in "libgd-devel".

Hi Gabor, running "openSUSE" the tool can be found within the package "gd-devel".

Debian also provides it in the libgd2-noxpm-dev package. I believe you can somehow choose to use libgd with or without XPM support.

Just in case you didn't know, there's the handy apt-file package/command for handily finding missing things:

$ apt-file search gdlib-config
libgd2-noxpm-dev: /usr/bin/gdlib-config
libgd2-noxpm-dev: /usr/share/man/man1/gdlib-config.1.gz
libgd2-xpm-dev: /usr/bin/gdlib-config
libgd2-xpm-dev: /usr/share/man/man1/gdlib-config.1.gz

Hi zengargoyle

I used: dpkg -S gdlib-config

Perhaps TMTOWTDI even with Debian :-).

Wouldn't be great if there was a database that maps package names across distributions? Or allows to find the package name on each distribution and distribution-version by filename it contains?

Ron, I think dpkg is limited to the things you have installed (and the names of available packages). `apt-file update` downloads the contents of all of the packages from some magic place and can search for things you don't have installed.


$ dpkg -S include/faad.h
dpkg-query: no path found matching pattern *include/faad.h*
$ apt-file search include/faad.h
libfaad-dev: /usr/include/faad.h
$ apt-get install libfaad-dev
$ dpkg -S include/faad.h
libfaad-dev:amd64: /usr/include/faad.h

The downside is you have to run `apt-file update` every once in a while.

Hi zengargoyle

Good point about the downside, but then, we have to run:

apt-get update; apt-get upgrade

every once in a while, too.

Had the same problem on CentsOS 5.8 just now, installing gd-devel via yum sorted it. Thanks for the post.

This is untested at the moment, but perhaps I can update this in a few minutes after exercising it a bit in my environment. This snippet is from a puppet manifest under development which manages an installation of an in-house application dependent on GD. It is intended to encapsulate the research above. Pretty sure this is the right factor key to test against. If blogs.perl.org permits an author to edit their own comments I will be back to fix any errors introduced here in the puppet and facter code, although in my environment at the moment I will only be testing against ubuntu.

  $libgd_package = $::operatingsystem ? {
     'Ubunutu' => 'libgd2-xpm-dev',
      'Debian' => 'libgd2-xpm-dev',
     'FreeBSD' => 'graphics/gd',
    'Mandriva' => 'libgd-devel',
    'openSUSE' => 'gd-devel',
     'CentsOS' => 'gd-devel',
       default => 'libgd',
  }

package { [ "$libgd_package" ]:
ensure => latest,
}

Underscoring the caveats above, dpkg -S was useless for this purpose, advising me only that no installed package provided the needed package. And apt-file requires the installation of an additional package. Guess I ought to add that to my utilities manifest, at least for my development machine.

And of course I mis-spelled the one OS I'm testing against. Worked with a Network Administrator once who told me that he did not make mistakes. He only cut-and-pasted other people's mistakes. Guess I should have run `facter operatingsystem` and followed his advise to avoid that error.

Otherwise, this puppet syntax seems to work fine.

Leave a comment

About Gábor Szabó - גאבור סבו

user-pic I blog about Perl.