安装mysql8.0报错 Requires: libstdc++.so.6
报错内容如下:
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.11)(64bit)
Error: Package: mysql-community-client-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-client-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-client-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: mysql-community-client-plugins-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-client-plugins-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.8)(64bit)
Error: Package: mysql-community-libs-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-libs-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: 2:postfix-2.10.1-9.el7.x86_64 (base)
Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
Removing: 1:mariadb-libs-5.5.52-1.el7.x86_64 (@anaconda)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Obsoleted By: mysql-community-libs-8.0.26-1.el8.x86_64 (mysql80-community)
Not found
Updated By: 1:mariadb-libs-5.5.68-1.el7.x86_64 (base)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-client-plugins-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: 2:postfix-2.10.1-9.el7.x86_64 (base)
Requires: libmysqlclient.so.18()(64bit)
Removing: 1:mariadb-libs-5.5.52-1.el7.x86_64 (@anaconda)
libmysqlclient.so.18()(64bit)
Obsoleted By: mysql-community-libs-8.0.26-1.el8.x86_64 (mysql80-community)
~libmysqlclient.so.21()(64bit)
Updated By: 1:mariadb-libs-5.5.68-1.el7.x86_64 (base)
libmysqlclient.so.18()(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libtirpc.so.3()(64bit)
Error: Package: mysql-community-client-plugins-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.8)(64bit)
Error: Package: mysql-community-client-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libtinfo.so.6()(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libtirpc.so.3(TIRPC_0.3.3)(64bit)
Error: Package: mysql-community-libs-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: mysql-community-libs-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.22)(64bit)
Error: Package: mysql-community-client-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: mysql-community-server-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libtirpc.so.3(TIRPC_0.3.0)(64bit)
Error: Package: mysql-community-client-8.0.26-1.el8.x86_64 (mysql80-community)
Requires: libncurses.so.6()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
解决办法
更新的libstdc++.so.6
查看动态库
strings /usr/lib64/libstdc++.so.6 | grep GLIBC
下载最新动态库libstdc++.so.6.0.26
拷贝到/usr/lib64
目录下
cp ./libstdc++.so.6.0.26 /usr/lib64
删除原理的软连接
rm -f libstdc++.so.6
默认库的软连接指向最新动态库
ln -s libstdc++.so.6.0.26 libstdc++.so.6
查看动态库
strings /usr/lib64/libstdc++.so.6 | grep GLIBC
如果更新后还报相同的错,考虑下是否下载的MySQL版本是否有问题
el8对应的是linux8(centos8)
el7对应centos7