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?


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.

Leave a comment

About Gabor Szabo

user-pic Perl author and trainer. Usually writing on other sites: Writing the Perl 5 Maven tutorial Perl 6 articles. Started a Perl IDE. Running the Weekly Perl newsletter. My personal blog.