Google Answers Logo
View Question
 
Q: glibc 2.2 on Redhat Linux 6.2 ( Answered 5 out of 5 stars,   2 Comments )
Question  
Subject: glibc 2.2 on Redhat Linux 6.2
Category: Computers > Operating Systems
Asked by: mwm126-ga
List Price: $15.00
Posted: 25 Nov 2003 07:58 PST
Expires: 25 Dec 2003 07:58 PST
Question ID: 280418
I want to run the latest Mozilla version (1.5) on Redhat 6.2.  All the
dependencies (http://www.mozilla.org/releases/mozilla1.5/installation.html#linux)
are satisfied except glibc 2.2.  glibc 2.1 is still needed for other applications;
both glibc 2.1 and 2.2 need to be installed simultaneously.  How can I
run glibc 2.2 on a Redhat 6.2 system?
Answer  
Subject: Re: glibc 2.2 on Redhat Linux 6.2
Answered By: maniac-ga on 25 Nov 2003 18:57 PST
Rated:5 out of 5 stars
 
Hello Mwm126,

There are a few different ways that should work to solve this problem.
Each one has different levels of effort / benefits so try to read
through all of them before trying one of them.

[1] Build mozilla from source using your current system (glibc 2.1).
Based on notes in the instructions, this should work, but I can't be
sure (without replicating your system). Go first to
  http://www.mozilla.org/source.html
to get the source code and
  http://www.mozilla.org/build/unix-details.html
which has the detailed build instructions. Page down to see a note on
glibc versions - it indicates a patch is needed for glibc 2.07,  but
you are past that version [that's the best clue I can find to show
this should work]. There is also an extensive list of dependencies -
but has links to all of them.

The next two approaches will get you files that can be "put in the
right places", but there are two ways to do that latter step. I'm
labeling these 2a and 2b for that reason.

[2a] Install glibc 2.2 in an alternate root location and move the
non-overlapping files into the proper location on your system. This
may take several steps to accomplish since rpm will "chroot" to the
alternate root location before doing the install steps. For example,
it may be necessary to do a sequence like...
  rpm --initdb --root otherroot
  rpm -i --force --root otherroot [your glibc 2.2 RPM]
but you may also need other utilities in that "otherroot" directory.
For example, you may need otherroot/bin/sh to run scripts. This has
the advantage of allowing you to get the glibc 2.2 files out of the
RPM package (w/o rebuilding).

[2b] Build glibc 2.2 from source. Download something like...
http://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/SRPMS/glibc-2.2.4-13.src.rpm
to get the source. Use
  rpmbuild glibc-2.2.4-13.src.rpm
to build the RPM. You should now also have the files in
  /usr/src/redhat/BUILD/glibc-2.2.4-13 (or a similar name)
both the source, and build products.

At this point, you need to move the files "into the right place".
Again, there may be more than one way to do this, so we have steps 3a
and 3b. In some ways, 3a may be "better" but might not work and 3b is
certainly "safer".

[3a] Move the products of glibc 2.2 into the standard locations one at
a time until Mozilla works. In this way, you can have a directory with
both
  glibc 2.1
  glibc 2.2
If Mozilla is built against files using the name "glibc 2.2" (or
similar), this will work. If it is built against files using the name
"glibc 2" (or something similar), it won't work - since I expect you
to keep glibc 2 pointing to the 2.1 versions.

[3b] Move the products of glibc 2.2 into a new location (perhaps a sub
directory of the standard location). Then, create a short script that
does something like (bash example follows):
  export LD_LIBRARY_PATH=new-location-goes-here
and/or
  export LD_PREFETCH=files-to-override
  mozilla
which would override the standard library path (first export command)
or preload certain libraries (which prevent use of the obsolete ones)
before running mozilla. This is "safer" because it does not modify the
standard library files. It is a little more inconvenient, because you
need a helper script for each application that needs this "fix".

Some of the more readable explantions of how the library loading
process works is at
  http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/dlls.html
which describes how to help secure programs by describing how this
works. At the same site, also check out
  http://www.dwheeler.com/program-library/Program-Library-HOWTO/shared-libraries.html
which describes shared libraries in more general terms and has some
script examples beyond the simple one above.

That's five possible approaches to solving this problem. The
combinations of 2/3 will directly answer your question "How can I run
glibc 2.2 on a RedHat 6.2 system", but the first should "meet the
need" of running a new version of Mozilla on a RedHat 6.2 system.

If you run into some rough spots or need a better explanation, please
use a clarification request. You may also get additional information
using search phrases such as
  environment variable load dynamic library linux
  build mozilla old glibc
and similar choices. I also found some of the build information on the
Mozilla site through the site map and following the various links
provided.

  --Maniac
mwm126-ga rated this answer:5 out of 5 stars
Thank you!  Using chroot with rpm sounds like the best approach.  Very
detailed answer; it will take some time for me to evaluate the
different suggestions!

Comments  
Subject: Re: glibc 2.2 on Redhat Linux 6.2
From: slawek-ga on 25 Nov 2003 11:05 PST
 
Did you run mozilla from an RPM?  If so, the easiest way to satisfy
dependencies would be the run the RPM via URPM vs. RPM command.  I
forget what the U stands for, but it can resolve a lot of dependancy
problems on the fly.

Please let me know if this works for you and if I can elaboarate for a full answer.
Subject: Re: glibc 2.2 on Redhat Linux 6.2
From: mwm126-ga on 25 Nov 2003 12:33 PST
 
Mozilla 1.5 RPM binaries will not install on Redhat 6.2 because they
depend on glibc 2.2.  The release notes
(http://www.mozilla.org/releases/mozilla1.5/installation.html#linux)
state that glibc 2.2 is needed, but Redhat 6.2 uses the earlier glibc
2.1.

The -U option for rpm is upgrade; it uninstalls old versions of the
rpm you are installing.  I'd prefer to install mozilla from an RPM of
course, but that's not the problem; the problem is that Mozilla 1.5
RPMs can't be installed on systems without glibc 2.2 (well, they *can*
be installed by forcing the --nodeps option, but then mozilla still
won't run without glibc 2.2 of course.)

I was wondering how multiple versions of glibc could coexist on a
Redhat 6.2 system; installing from RPMs is not possible because of
conflicts between the RPMs for glibc 2.1 and glibc 2.2.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy