Thursday, August 25, 2011
5:28 PM

Error while configuring Gdk-pixbuf for gtk


The following error might appear while configuring Gdk-pixbuf  which is needed for installing Gtk.

checking for GLIB - version >= 2.25.15...
*** 'pkg-config --modversion glib-2.0' returned 2.29.12, but GLIB (2.24.2)
*** 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
no
configure: error:
*** GLIB 2.25.15 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/



The error could be because of multiple versions of glib versions present in your system.

Workaround:

Look at the contents of "/lib"

$ ls -l libg*
-rw-r--r-- 1 root root  116600 Nov 14  2010 libgcc_s.so.1
lrwxrwxrwx 1 root root      23 Jul 11 14:00 libglib-2.0.so.0 -> libglib-2.0.so.0.2400.2
lrwxrwxrwx 1 root root      23 Jul 11 14:00 libglib-2.0.so.0.2400.2


If the output is some thing similar to the above ,we can see that the lib file present in the /lib is of 2.24 version which is being detected while configuring. To change this we need to locate the newer ".so" file.


Run the following commands to locate if a newer file is present.

$sudo updatedb 
$sudo locate libglib-2.so.0

/lib/libglib-2.0.so.0
/lib/libglib-2.0.so.0.2400.2
/usr/local/lib/libglib-2.0.so.0
/usr/local/lib/libglib-2.0.so.0.2912.0
/usr/local/share/gdb/auto-load/libglib-2.0.so.0.2912.0-gdb.py


In the output we can see that the newer, 2.29.12, is present ins "/usr/local/lib/" i.e. /usr/local/lib/libglib-2.0.so.0.2912.0.
So we need  to remove the older lib file in /lib and replace it with this new one.  Which can be done as follows



$ sudo  rm /lib/libglib-2.0.so.0.2400.2
$ sudo rm /lib/libglib-2.0.so.0
$ sudo cp /usr/local/lib/libglib-2.0.so.0.2912.0
$ sudo ln -s /usr/local/lib/libglib-2.0.so.0.2912.0 /lib/libglib-2.0.so.0

Now run the configure again and your error should not appear again.

Also remove all the previous libglib files from /usr/local/lib, i.e. in this case  /lib/libglib-2.0.so.0.2400.2. 

0 comments:

Post a Comment