5

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

2 Answers2

3

I have the same problem as you.

I set PKG_CONFIG_PATH and LD_LIBRARY_PATH as

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
LD_LIBRARY_PATH=/usr/local/lib

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

echo $LD_LIBRARY_PATH
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!

Seyer
  • 31
0

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.