**gcc 8.2.0 :**
$ gcc -v
$ yum -y install wget bzip2 gcc gcc-c++ glibc-headers
download package :https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc
or
$ wget -c -P /opt/ https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz
$ cd /opt/
$ 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://ftp.gnu.org/gnu/make/
or
$ wget -c -P /opt/ https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz
$ 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://ftp.gnu.org/gnu/glibc.
put it into /software
or
$ wget -c -P /opt/ https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz
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 :
--------------------------------------
locale get error:
locale: Cannot set LC_ALL to default locale: No such file or directory
$ cd /opt/glibc-2.28/build
$ make localedata/install-locales
--------------------------------------
node -v get error:
node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node)
node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)
$ ll /usr/lib64 |grep libstdc++
$ ln -sv /usr/local/gcc-8.2.0/lib64/libstdc++.so.6.0.25 /usr/lib64/libstdc++.so.6.0.25
$ rm -f /usr/lib64/libstdc++.so.6
$ ln -sv /usr/lib64/libstdc++.so.6.0.25 /usr/lib64/libstdc++.so.6
--------------------------------------
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'
same as above
引用自 https://blog.csdn.net/liuchenbaidu/article/details/131815185