On centos 7.9, I update glibc 2.1 to 2.28 , it works:
1Check Glibc version: strings /lib64/libc.so.6 | grep GLIBC , On my System ,it get:
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE.
I need update GLIBC_2.17 to higher version , recommend Glibc 2.28.
First please update gcc ,make,bison ,then install Glibc 2.28):
recommend update:
---------------------------------
**gcc 8.2.0 :**
$ gcc -v
$ yum -y install wget bzip2 gcc gcc-c++ glibc-headers
download package :https:
or
$ wget -c -P /software/ https:
$ cd /software/
$ tar -zxvf gcc-8.2.0.tar.gz
$ cd gcc-8.2.0
$ ./contrib/download_prerequisites
result:
gmp-6.1.0.tar.bz2: OK
mpfr-3.1.4.tar.bz2: OK
mpc-1.0.3.tar.gz: OK
isl-0.18.tar.bz2: OK
All prerequisites downloaded successfully.
$ mkdir build
$ cd bulid
$ ../configure --prefix=/usr/local/gcc-8.2.0 --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --disable-multilib
$ make
My system execute make command at least 3 hours, please waiting it complete.
then:
$ make install
$ echo -e '\nexport PATH=/usr/local/gcc-8.2.0/bin:$PATH\n' >> /etc/profile.d/gcc.sh && source /etc/profile.d/gcc.sh
$ ln -sv /usr/local/gcc-8.2.0/include/ /usr/include/gcc
$ ldconfig -v
$ ldconfig -p |grep gcc
result:
libgcc_s.so.1 (libc6,x86-64) => /lib64/libgcc_s.so.1
check version
$ gcc -v
------------------------------------
**make 4.2.1:**
First download make 4.2.1 from https:
$ make -v
$ tar -zxvf make-4.2.1.tar.gz
$ cd make-4.2.1
$ mkdir build
$ cd build
$ ../configure --prefix=/usr
$ sh build.sh
$ make install
check result
$make -v
----------------------------------------
**bison 3.0.4**
$ bison -V
if not found result ,need install:
$ yum install -y bison
--------------------------------------------------------
all complete , you can install glibc-2.28
download glibc-2.28 from http:
put it into /software
You can adopt the following steps:
$ tar -xf glibc-2.28.tar.gz
$ cd glibc-2.28
$ mkdir build
$ cd build
$ ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
$ make
$ make install
$ ls -l /lib64/libc.so.6
Last, check version :
$ strings /lib64/libc.so.6 | grep GLIBC
.....
GLIBC_2.26
GLIBC_2.27
GLIBC_2.28
GLIBC_PRIVATE
It completed .
Other :
bootstarp Directus , maybe get error:
Import Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found, you reed update CXXABI :
$ strings /usr/lib64/libstdc++.so.6 | grep 'CXXABI'
$ whereis gcc
$ export LD_LIBRARY_PATH=/usr/local/gcc-8.2.0/lib64:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH=/usr/local/gcc-8.2.0/lib64/lib:$LD_LIBRARY_PATH