解决centos7 安装 mysql8 Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)....的常见坑

对应版本的库明明存在,mysql与centos版本也对应,但是就是提示Requires

[root@11 mysql]# yum install mysql-community-server

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:8.0.16-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 8.0.16-1.el7 for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.7)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:8.0.16-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
---> Package mysql-community-common.x86_64 0:8.0.16-1.el7 will be installed
---> Package mysql-community-server.x86_64 0:8.0.16-1.el7 will be installed
--> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.7)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:8.0.16-1.el7 will be installed
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-client-8.0.16-1.el7.x86_64
---> Package mysql-community-libs.x86_64 0:8.0.16-1.el7 will be installed
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-libs-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-libs-8.0.16-1.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-libs-8.0.16-1.el7.x86_64
---> Package mysql-community-server.x86_64 0:8.0.16-1.el7 will be installed
--> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.7)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-8.0.16-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit)
Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit)
Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: systemd
Error: Package: mysql-community-libs-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit)
Error: Package: mysql-community-libs-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.7)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libsasl2.so.3()(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.17)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit)
Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit)
Error: Package: mysql-community-libs-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: mysql-community-server-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.17)(64bit)
Error: Package: mysql-community-client-8.0.16-1.el7.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
2:postfix-2.6.6-8.el6.x86_64 has missing requires of libmysqlclient.so.16()(64bit)
2:postfix-2.6.6-8.el6.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-8.el6.x86_64 has missing requires of mysql-libs

原因及办法:我第一次安装成了el8的mysql-server,卸载之后,yum没有clean。

1、yum update (可选)
2、rpm -qa|grep mysql #找到已装的rpm包名
3、rpm -e 包名 #卸载
4、yum clean all #清缓存 关键!!

你可能感兴趣的:(服务器运维手册)