Lots of makefiles use pkg-config but the names don't relate to package managers (e.g. yum / apt). How to map pkg-config names to them? is there a trick?
Example: if I do yum searchName
-- look through the name and approximate to pkg-config's name
Result:
$ pkg-config --libs dbus-glib-0
Package dbus-glib-0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-glib-0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-glib-0' found
$ sudo yum install dbus-glib
Loaded plugins: langpacks, refresh-packagekit
Package dbus-glib-0.100-5.fc19.i686 already installed and latest version
Nothing to do
$ sudo yum install dbus-glib-0
Loaded plugins: langpacks, refresh-packagekit
No package dbus-glib-0 available.
Error: Nothing to do
The pkg-config files are usually provided by the -devel package so in most cases foo.pc is provided by libfoo-devel. That's still guesswork, but there are two shortcuts:
Installing by path name, if you know where the .pc file will end up
That works for any file, but you still need to guess where the .pc file is. The best approach is using the actual pkgconfig requirement:
Use the quotes to avoid the shell trying to interpret the parenthesis.
In the case of apt-get, if you have some software that complains about this missing package via pkg-config, for instance:
Then it means that the configure script is looking for the
gtk+-2.0
pkgconfig package.Then, what you can do is this:
Which means you can install package libgtk2.0-dev:
And the dependency would be satisfied.
In the particular case of the original question:
(dbus-glib-0 seems to be too old to show up in my system.)