Re: Newbie Library Question




On Tue, 12 Jan 1999, Scott Abbott wrote:
> Hello:

Hi there!


> I'm a total newbie at all this so please understand.  

No problem :-)

> My question is about the various libraries like glib and gtk+ that
> certain applications require.  If I have a version, say, 1.1.9 and
> install 1.1.12, can I uninstall the version 1.1.9? 

You can, but you probably shouldn't.  Unlike other dynamic library
systems, ld.so libraries (the ones you've got here) can have multiple
versions installed.  The advantage of leaving 1.1.9 around when you
install 1.1.12 is that any programs that were compiled for 1.1.9 will
still work without needed to be rebuilt.  If you get rid of 1.1.9, then
you will have to recompile or update all of your GTK binaries so they work
with 1.1.12.


> If so, how do you do this?

If they were installed with a package manager, you remove them with the
package manager.  With rpm you use "rpm -e foo" to remove the package foo,
or "rpm -Uvh foo-1.2-3.i386.rpm" to remove the old version of foo and
replace it with the new version in the foo-1.2-3.i386.rpm file.  Dpkg has
similar functions, but the command looks different.

If they were installed manually, then you go to the directory with the
old library in it, remove both the library file and its link, and run
ldconfig.  For example, in the directory tree below it would be:
  $ cd /usr/local/lib
  $ rm libglib-1.1.so.9.0.0 libglib-1.1.so.9
  $ ldconfig


> I just did a locate libglib and here's the results:
> 
> /usr/lib/libglib-1.1.so.11
> /usr/lib/libglib-1.1.so.11.0.0
> /usr/lib/libglib-1.1.so.3
> /usr/lib/libglib-1.1.so.3.0.0
> /usr/lib/libglib.a
> /usr/lib/libglib.la
> /usr/lib/libglib.so
> /usr/lib/libglib.so.1
> /usr/lib/libglib.so.1.0.6
> /usr/local/lib/libglib-1.1.so.9
> /usr/local/lib/libglib-1.1.so.9.0.0
> /usr/local/lib/libglib.a
> /usr/local/lib/libglib.la
> /usr/local/lib/libglib.so
> 
> As you can see, I have several different versions.  Do I need all these
> versions?

You don't necessarily need all of those versions, but you might.  You
should definately leave the libglib.so.1/libglib.so.1.0.6, many prebuilt
binaries use them.  The others you should probably keep, unless you are
really strapped for space, in which case remove the older versions first.

It looks like you have another problem brewing.  Unless you are an
advanced developer you really should have one and only one copy of
libglib.a, libglib.la and libglib.so.  Having two copies of these files
can lead to hard to predict results.

Now, the /usr/lib directory usually gets fed by the package managers,
while /usr/local/lib is the default place for GNOME builds to install
themselves, so at a guess it looks like you manually built glib version
1.1.9, and installed glib versions 1.0.6, 1.1.3 and 1.1.11 with your
package manager.  In addition you have installed a glib-devel package of
indeterminant version with your package manager.

You need to decide how you want to manage the development (1.1.x) versions
of glib (and presumably gtk+) on your system.  If you want to use the
package system, get rid of /usr/local/lib/libglib*, run ldconfig, and
don't touch CVS or tarballs for development glib.

If you would rather keep the stable (1.0.6) version package managed and
manually handle the development versions, remove the glib-devel (or
whatever it was called) package, and don't use the package manager for any
development versions of glib.

Since glib development and gtk+ development go hand in hand, you should
really do the same thing with gtk+ versions that you decide to do with
glib versions.

Best of Luck,
-Gleef



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