解決安裝mysql動態庫libstdc++.so.6、libc.so.6版本過低問題


初始化mysql報錯:

./bin/mysqld: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./bin/mysqld)
./bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./bin/mysqld)
---------------------

原因:動態庫版本低

[root@haughty software] strings /usr/lib/libstdc++.so.6 | grep GLIBCXX    ###查看動態庫版本
並沒有動態庫中要求的GCC版本 “GLIBCXX_3.4.15”,所以需要進行升級一下我們的GCC版本 過程如下:
[root@haughty software] wget http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb #下載較新版本的GCC libstdc庫
[root@haughty software] ar -x libstdc++6_4.7.2-5_amd64.deb #解壓
[root@haughty software] tar -zxvf data.tar.gz #解壓
[root@haughty software] cp usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17 /usr/lib64 #拷貝至/usr/lib64下
[root@haughty software] rm -rf /usr/lib64/libstdc++.so.6 #刪除低版本庫的軟連接
[root@haughty software] ln -s /usr/lib64/libstdc++.so.6.0.17 /usr/lib64/libstdc++.so.6
-----------------------------------------------------------------------------------------------------------
./bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./bin/mysqld)
解決:
[root@haughty mysql]#strings /lib64/libc.so.6 |grep GLIBC
wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
tar -xvf glibc-2.15.tar.gz
tar -xvf glibc-ports-2.15.tar.gz
mv glibc-ports-2.15 glibc-2.15/ports
mkdir glibc-build-2.15
cd glibc-build-2.15
ls
../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make
make install
strings libc.so | grep GLIBC

 

處理問題鏈接:
https://blog.csdn.net/poxiaonie/article/details/74059023


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM