前言
CentOS Linux release 7.3.1611 (Core) 环境安装Mysql8.0.27版本的时候,报错如下: mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by mysqld) mysqld: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /lib64/libstdc++.so.6) 本文详细说明了报错的处理方法
[root@jeames ~]# mysqld --initialize
mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by mysqld) mysqld: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /lib64/libstdc++.so.6)
[root@jeames ~]# strings /lib64/libc.so.6 | grep ‘GLIBC’
1.centos 升级GCC编译器
yum -y install centos-release-scl yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils scl enable devtoolset-8 bash echo "source /opt/rh/devtoolset-8/enable" >>/etc/profile
2.升级make
wget http://ftp.gnu.org/gnu/make/make-4.2.tar.gz tar -xzvf make-4.2.tar.gz cd make-4.2 ./configure make make install rm -rf /usr/bin/make cp ./make /usr/bin/ make -v
3.编译安装glibc-2.28
tar zxf 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 注意:此过程需要耐心等待10分钟即可
[root@jeames build]# ll /lib64/libc.so.6*
lrwxrwxrwx 1 root root 12 Nov 21 23:02 /lib64/libc.so.6 -> libc-2.28.so