I am in the process of installing GTK+ but it needs various pre-requisites. These are

  • glib - 2.0 >= 2.35.3
  • atk - >= 2.7.5
  • Pango- >= 1.32.4
  • gdk-pixbuf-2.0 >= 2.27.1

Now I upgraded my glib-2.0 to 2.38.2, and I've tried upgrading atk, pango and gdk-pixbuf

checking for GLIB - version >= 2.31.2... 
'pkg-config --modversion glib-2.0' returned 2.38.2, but GLIB (2.32.4)
was found! If pkg-config was correct, then it is best
to remove the old version of GLib. You may also be able to fix the error
by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
/etc/ld.so.conf. Make sure you have run ldconfig if that is
required on your system.
If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
to point to the correct configuration files

configure: error: 
GLIB 2.31.2 or better is required. The latest version of
GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
but not in the same location as pkg-config add the location of the file
glib-2.0.pc to the environment variable PKG_CONFIG_PATH.

I have been go round in circles for the past few hours trying to get this working, if anyone out there can help it would be much appreciated. Thanks in advance

  • How did you upgrade glib? – chaskes Feb 20 '14 at 23:43
  • Downloaded it from ftp.gnome.org/pub/gnome/sources/glib and just did the ./configure && make && make install – Hakim_Djzarie Feb 21 '14 at 8:27
  • The package manager doesn't know you installed the newer glib and only sees the older version. What version of Ubuntu are you using? – chaskes Feb 21 '14 at 15:38
  • 12.04 is my version of Ubuntu chaskes – Hakim_Djzarie Feb 25 '14 at 21:09

I have the same problem as you.



see https://stackoverflow.com/questions/11228173/how-to-find-where-older-version-of-glib-has-been-installed

But it didn't work. Then I found someone solve it as

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

see http://www.linuxquestions.org/questions/linux-software-2/how-to-set-ld_library_path-pkg_config_path-and-glib_config-937732/

And it did work!

| improve this answer | |

I tested this so many times, and i verified that if we installed glib from source, we have to options:

  1. If with do ./configure --prefix=/usr --with-pcre=system , like in instructions, it means that we have glib installed in /usr/lib path. So, we need to make export LD_LIBRARY_PATH=/usr/lib.
  2. If we don't use --prefix=the default path is /usr/local/lib/. So, if pkg_configfinds two libraries installed we need to make export LD_LIBRARY_PATH=/usr/local/libif we installed in default path.

Hope it helps someone.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.