天天看點

Linux7部署 Mysql初始化報錯GLIBC_2.28處理

Linux7部署 Mysql初始化報錯GLIBC_2.28處理

文章目錄

  • ​​前言​​
  • ​​1.centos 更新GCC編譯器​​
  • ​​2.更新make​​
  • ​​3.編譯安裝glibc-2.28​​

前言

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      

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      

繼續閱讀