Re: How to remove the old version of GLib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 16, 2009 at 11:16:28AM +0800, Jay Abellon wrote:
>         I have just installed Glib-2.18.4 and now I'm trying to install 
> atk-1.24.0 but I am getting this error:
> 
> 
> *** 'pkg-config --modversion glib-2.0' returned 2.18.4, but GLIB (2.4.7)
> *** 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
> 
> I installed Glib using ./configure --prefix=/usr

You screwed up your system.  If you want to overwrite system libraries
you should be able and willing to deal with the consequences youself.
Othewrise please do not compile and install random rubbish into /usr.

> I am sure that my PKG_CONFIG_PATH was set correctly and it was pointing to 
> directory of pkgconfig where glib-2.0.pc is located.
> i already set LD_LIBRARY_PATH in my bash_profile pointing the directory of 
> /usr/local/lib/pkgconfig 
> /etc/ld.so.conf
> 
> PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib64/frysk/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:

If GLib is installed to /usr, what is in /usr/local then or why you
mention it?
Where is the old GLib?
What pkg-config --variable=prefix glib-2.0 says?
What ldd $(which gobject-query) prints as the library locations?
Why they differ?

> seems that I really need to de-install the old version of GLIB 
> 
> But how? I tried rpm -e --allmatches glib and i got error becuase of 
> dependencies.
> I followed http://ubuntuforums.org/showthread.php?t=245376&highlight=glib
> but there's still no luck.

I suppose you have a RPM-based distro, not Ubuntu.  First, get the system back
to a sane state.  This means reinstall the system glib with something like

rpm --replacepkgs --replacefiles GLIB-YOU-GOT-FROM-THE-DISTRO.rpm

The same for the -devel package.  These are often called glib2 and glib2-devel
(glib meaning GLib 1.x).  The same with anything else you have overwritten.

Then find leftover files from the new GLib:

find /usr/include/glib-2.0 | xargs rpm -qf >/dev/null
find /usr/share/gtk-doc/html/glib | xargs rpm -qf >/dev/null
rpm -qf /usr/lib64/libglib* >/dev/null

Possibly in other places, but these are the most likely (also, depending
on the distro it might print things that actually belon there, use your brain).
Run ldconfig.

The same with anything else you have overwritten.

Then look for a newer version of the package for your distro.

Failing that, install the new glib into a ***NON-SYSTEM*** prefix.  Ideally
somewhere in your home (~/opt/gnome), or in a location such as /opt/gnome if
you really, really, really need it installed for all users (though in such case
I recommend to try harder to find and/or rebuild a package of the new GLib
instead).

Set PKG_CONFIG_PATH and LD_LIBRARY_PATH to point to this prefix when compiling
(or using) the stuff depending on the new GLib.

Yeti

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux