error while loading shared libraries: requires glibc 2.5 or later dynamic linker

C development environment under Linux setup process
– install glibc
Some software may require that your system’s Glibc be higher than a certain version to work, and if your Glibc is lower than the required version, you will have to upgrade your Glibc in order to run the software. Such as:
Error while loading Shared Libraries: Requires glibc 2.5 or later Dynamic Linker
You can look for compiled RPM packages or use source code to upgrade Glibc.
RPM package glibc
RPM is relatively easy to install, but the dependency problem is difficult to solve. Give a download address:
$ RPM – the ivh glibc 2.5-49.. I386 RPM
But I’m using CentOS 4.8 and it doesn’t seem to be compatible…
error: Failed dependencies:
Glibc-common = 2.5-49 is needed by glibC-2.5-49. I386
glibc > 2.3.4 conflicts with glibc – common – 2.3.4-2.43 el4_8. 3. The i386
After the installation is complete, you can check whether you have upgraded:
$ ls -l /lib/
lrwxrwxrwx 1 root root 11 10-08 22:08 /lib/ -> Libc – 2.5. So
compile and install glibc
Download the glibc
[root@localhost test]# pwd
[root @ localhost test] # wget
Download the glibc – linuxthreads
[root @ localhost test] # wget
Unpack the
[root-@localhost test]# tar-jvxf glibc-2.9.tar.bz2
[root @ localhost test] # CD glibc 2.9
[root-@localhost glibc-2.9]# tar-jvxf../glibc – linuxthreads – 2.5. Tar..bz2
[root @ localhost glibc 2.9] # CD..
[root@localhost test]# exportCFLAGS=”-g -O2 -march=i486″
[root@localhost test]# mkdir glibc-build
[root@localhost test]# cd glibc-build
[root@localhost glibc-build]# .. /glibc-2.9/configure –prefix=/usr –disable-profile — enabling -add-ons –with-headers=/usr/include –with-binutils=/usr/bin
The installation
[root@localhost glibc-build]# make
[root@localhost glibc-build]# make install
Three points should be paid attention to during installation and compilation:
1. To unzip glibC-LinuxThreads into glibc directory.
2. Cannot run configure in glibc’s current directory.
Otherwise, if there is an error: error “Glibc cannot be Compiled without optimization”, please add the optimization switch: [root-@localhost test]# export CFLAGS=” -g-O2-March =i486″

Reproduced in:

Read More: