mysql libc.so.6_解决安装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

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值