LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-21-2006, 02:58 PM   #1
nectron101
Member
 
Registered: Nov 2004
Distribution: SuSE 9.1 Personal
Posts: 41

Rep: Reputation: 15
Removing an old version of GLib...HELP plz!!


I'm trying to install GTK2 and its required dependencies..

I've installed Glib, but now when I tried to ./configure ATK, I get an error massege saying that I have an older version of GLib which should be removed.

Code:
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.0.0...
*** 'pkg-config --modversion glib-2.0' returned 2.11.4, but GLIB (2.10.3)
*** 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
How can I resolve this problem?

Thanks in advance..
 
Old 09-21-2006, 03:33 PM   #2
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
For SUSE, shouldn't Yast2 be able to download and install system upgrades like that for you? The Glibc/ATK/Pango routine is one of the more hellish installations I've ever done, and it's one of the few I've resolved never to do again manually - for precisely the reasons you're coming up against. Package-managed systems such as SUSE, which are built with the intention that you only use their system (in this case, yast2) tend to behave really badly when you start ./configure && make && make install'ing packages - especially big important ones like glibc. The package management tool can't keep track of manually-installed packages and then everything just goes to heck.

If it's at all possible for you to upgrade them via a distro-specific tool, I encourage you to do so. However, if you need to do it manually, the first thing I would do is run 'ldconfig' as root and then try the atk compilation again. If you're still not having any luck, find the two paths for glibc, and be sure that when you echo $LD_LIBRARY_PATH it includes the path to the 2.11.4 installation, as does /etc/ld.so.conf if you have it. Basically, it's suggesting that if you can't remove the older version (and to do so might screw up more than it helps), take any steps that you can to make your system forget that it's there.
 
Old 09-23-2006, 01:25 PM   #3
nectron101
Member
 
Registered: Nov 2004
Distribution: SuSE 9.1 Personal
Posts: 41

Original Poster
Rep: Reputation: 15
I'm actually using Ubuntu 6.06..

How can I remove the old version of Glib?

I couldn't get GTK2 through apt-get, so I need to remove the old version now..

Any replie is welcome..
 
Old 09-23-2006, 03:28 PM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Ubuntu comes with gtk+-2 as it uses Gnome. It sounds like you need to install some sort of development package. Try
Code:
sudo apt-get install libgtk2.0-dev
I find the command apt-cache search to be very useful when I'm trying to work out what I need to install
 
Old 09-23-2006, 10:49 PM   #5
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 780

Rep: Reputation: 248Reputation: 248Reputation: 248
Answer #1, a.k.a "Safe Distro Answer": Uninstall glib1 and friends using your package manager. Install glib2 and friends using the same method. Make sure you cp -a all the glib, atk, pango, and g?k .so libs into a safe place first should your package manager decide to whack installed shared libraries. This way you can still run old binaries compiled against glib1 (but you'll not be able to compile any more glib1 stuff.)

Answer #2, a.k.a "By hand". glib/atk/gtk,gdk is generally thought of as a set. The versions should live in harmony, that is, glib2 with gtk2. You build it by compiling/installing in order: glib, atk, (Cairo and friends if using them), pango, gtk. Old glib1/gtk1 used stuff like "glib-config" in /usr/bin, and queried that to find version numbers, comparing what that script said against what it found in the installed headers. glib2 and friends use pkgconfig. Have a peek in /usr/lib/pkgconfig. You should see lots of *.pc files. Those files are in a special format that tell info about what's install on the system. Lots of things use pkgconfig, but lots doesn't. You can check a version, see cflags, and find other info by using the pkgconfig binary:

Code:
pkg-config glib-2.0 --modversion
2.8.6
pkg-config pango --modversion
1.10.4
pkg-config atk --modversion
1.10.3
pkg-config cairo --modversion
1.1.10
pkg-config libpixman  --modversion
0.1.6
So, if you have glib1 likely you'll have glib-config in /usr/bin. Uninstalling glib1 would entail removing all its headers, its configure script "glib-config" (likely the part atk is finding left over from the old install), its *.a libraries in /usr/lib, and its documentation. I don't think it had a pkg-config script, but it's been awhile since I had glib1 on the system. Just look and see if there is one. I move the old shared libs down to /lib to indicated they are obsoleted off the system, but can still be used to run already-compiled binaries. If you think nothing is using them, move them to a trash area and use the system as usual. If after a month or so you didn't hear any "can't find shared object glib, gmodule, gobject, gthread" errors, then you can think of erasing them.

Since you're pulling glib1, you really should do atk, pango, cairo/libpixman/glintz/pango-cairo, and gtk/gdk at the same time, jump their versions up too. Most things build against glib2/gtk2 nowdays, with only a few things still wanting the first installment.

As in the first part of my reply, on a distro system the package manager should be taking care of this, but it can't hurt to know what's going on underneath the hood.

Also, you can trace thru ./configure scripts by looking at config.log after they've bombed. They have a record of what happened and what line number inside ./configure script it was at when it went wrong.

Last, usually glib, atk, gtk/gdk and friends sit in /usr/lib, which is always searched by the dynamic linker, so you should not have to touch neither /etc/ld.so.conf nor any LD_* variables. The only time you need those is if you are sticking .so libraries in a weird place and want your applications to be able to find them anyway, such as /usr/etc/bet/you/would/not/look/for/solibs/here.

Make sure to run ldconfig to rebuild the cache after installing/removing any shared libs. Libtool will usually do this for you, if you're using libtool. Notice also that glib != glibc.

Quote:
Package-managed systems such as SUSE, which are built with the intention that you only use their system (in this case, yast2) tend to behave really badly when you start ./configure && make && make install'ing packages - especially big important ones like glibc. The package management tool can't keep track of manually-installed packages and then everything just goes to heck.
I'll second that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
removing an older glib version ashlesha Linux - Software 2 07-12-2006 08:18 PM
removing an older glib version ashlesha Linux - Newbie 1 07-12-2006 05:43 PM
Removing old version of Glib authenticgeek Linux - Newbie 1 09-24-2003 02:05 AM
Removing an old version of glib authenticgeek Linux - Software 3 09-18-2003 03:32 PM
Removing Old Version of Glib Subleak Linux - Newbie 1 08-10-2003 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration