跳过 Mysql 包

跳过 Mysql 包

这看起来像是一个重复的问题,但我已经做了研究,仍然无法找到解决这个问题的方法。

问题:

在我的 Linux 机器上安装 mysql 服务器时,我Error在 mysql 安装过程中收到通知。这些错误表明缺少依赖项。

安装输出:

[root@ded501 mcnations]# sudo yum install mysql80-community-release-el8-1.noarch                                                                                                                                                             .rpm
Loaded plugins: fastestmirror
Examining mysql80-community-release-el8-1.noarch.rpm: mysql80-community-release-                                                                                                                                                             el8-1.noarch
mysql80-community-release-el8-1.noarch.rpm: does not update installed package.
Error: Nothing to do
[root@ded501 mcnations]# yum repolist enabled | grep "mysql.*-community.*"
mysql-connectors-community/x86_64       MySQL Connectors Community            74
mysql-tools-community/x86_64            MySQL Tools Community                 33
mysql80-community/x86_64                MySQL 8.0 Community Server            81
[root@ded501 mcnations]# sudo yum install mysql-community-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: reflector.westga.edu
 * extras: repos-tx.psychz.net
 * updates: mirror.teklinks.com
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:8.0.21-1.el8 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 8.0.21-1.el8 for pack                                                                                                                                                            age: mysql-community-server-8.0.21-1.el8.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package:                                                                                                                                                             mysql-community-server-8.0.21-1.el8.x86_64
--> Processing Dependency: net-tools for package: mysql-community-server-8.0.21-1                                                                                                                                                            .el8.x86_64
--> Processing Dependency: libtirpc.so.3(TIRPC_0.3.3)(64bit) for package: mysql-c                                                                                                                                                            ommunity-server-8.0.21-1.el8.x86_64
--> Processing Dependency: libtirpc.so.3(TIRPC_0.3.0)(64bit) for package: mysql-c                                                                                                                                                            ommunity-server-8.0.21-1.el8.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.22)(64bit) for package: mys                                                                                                                                                            ql-community-server-8.0.21-1.el8.x86_64
--> Processing Dependency: libtirpc.so.3()(64bit) for package: mysql-community-se                                                                                                                                                            rver-8.0.21-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: mysql-community-se                                                                                                                                                            rver-8.0.21-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: mysql-community                                                                                                                                                            -server-8.0.21-1.el8.x86_64
---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2                                                                                                                                                            .10.1-7.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for pac                                                                                                                                                            kage: 2:postfix-2.10.1-7.el7.x86_64
---> Package mysql-community-client.x86_64 0:8.0.21-1.el8 will be installed
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.21)(64bit) for package: mys                                                                                                                                                            ql-community-client-8.0.21-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) for package: my                                                                                                                                                            sql-community-server-8.0.21-1.el8.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.28)(64bit) for package: mysql-commun                                                                                                                                                            ity-server-8.0.21-1.el8.x86_64
--> Processing Dependency: libtirpc.so.3()(64bit) for package: mysql-community-se                                                                                                                                                            rver-8.0.21-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: mysql-community-se                                                                                                                                                            rver-8.0.21-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: mysql-community                                                                                                                                                            -server-8.0.21-1.el8.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be updated
---> Package mariadb-libs.x86_64 1:5.5.65-1.el7 will be an update
---> Package mysql-community-client.x86_64 0:8.0.21-1.el8 will be installed
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.21)(64bit) for package: mys                                                                                                                                                            ql-community-client-8.0.21-1.el8.x86_64
---> Package mysql-community-libs.x86_64 0:8.0.21-1.el8 will be obsoleting
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.21)(64bit) for package: mys                                                                                                                                                            ql-community-libs-8.0.21-1.el8.x86_64
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.20)(64bit) for package: mys                                                                                                                                                            ql-community-libs-8.0.21-1.el8.x86_64
--> Processing Dependency: libstdc++.so.6(CXXABI_1.3.9)(64bit) for package: mysql                                                                                                                                                            -community-libs-8.0.21-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_1)(64bit) for package: mysql                                                                                                                                                            -community-libs-8.0.21-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_0)(64bit) for package: mysql                                                                                                                                                            -community-libs-8.0.21-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: mysql-community-se                                                                                                                                                            rver-8.0.21-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: mysql-community                                                                                                                                                            -server-8.0.21-1.el8.x86_64
---> Package postfix.x86_64 2:2.10.1-7.el7 will be updated
---> Package postfix.x86_64 2:2.10.1-9.el7 will be an update
Removing mariadb-libs.x86_64 1:5.5.65-1.el7 - u due to obsoletes from mysql-commu                                                                                                                                                            nity-libs.x86_64 0:8.0.21-1.el8 - u
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.65-1.el7 will be an update
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for pac                                                                                                                                                            kage: 2:postfix-2.10.1-9.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2                                                                                                                                                            .10.1-9.el7.x86_64
---> Package mysql-community-client.x86_64 0:8.0.21-1.el8 will be installed
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.21)(64bit) for package: mys                                                                                                                                                            ql-community-client-8.0.21-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: mysql-community-cl                                                                                                                                                            ient-8.0.21-1.el8.x86_64
--> Processing Dependency: libncurses.so.6()(64bit) for package: mysql-community-                                                                                                                                                            client-8.0.21-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: mysql-community                                                                                                                                                            -client-8.0.21-1.el8.x86_64
---> Package mysql-community-libs.x86_64 0:8.0.21-1.el8 will be obsoleting
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.21)(64bit) for package: mys                                                                                                                                                            ql-community-libs-8.0.21-1.el8.x86_64
---> Package mysql-community-server.x86_64 0:8.0.21-1.el8 will be installed
--> Processing Dependency: libtirpc.so.3(TIRPC_0.3.3)(64bit) for package: mysql-c                                                                                                                                                            ommunity-server-8.0.21-1.el8.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.28)(64bit) for package: mysql-commun                                                                                                                                                            ity-server-8.0.21-1.el8.x86_64
--> Processing Dependency: libtirpc.so.3()(64bit) for package: mysql-community-se                                                                                                                                                            rver-8.0.21-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: mysql-community-se                                                                                                                                                            rver-8.0.21-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: mysql-community                                                                                                                                                            -server-8.0.21-1.el8.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-community-server-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libssl.so.1.1(OPENSSL_1_1_0)(64bit)
Error: Package: mysql-community-server-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libssl.so.1.1(OPENSSL_1_1_1)(64bit)
Error: Package: mysql-community-libs-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libssl.so.1.1(OPENSSL_1_1_0)(64bit)
Error: Package: mysql-community-libs-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libssl.so.1.1(OPENSSL_1_1_0)(64bit)
Error: Package: mysql-community-libs-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: 2:postfix-2.10.1-9.el7.x86_64 (base)
           Requires: libmysqlclient.so.18()(64bit)
           Removing: 1:mariadb-libs-5.5.60-1.el7_5.x86_64 (@base)
               libmysqlclient.so.18()(64bit)
           Obsoleted By: mysql-community-libs-8.0.21-1.el8.x86_64 (mysql80-commun                                                                                                                                                            ity)
              ~libmysqlclient.so.21()(64bit)
           Updated By: 1:mariadb-libs-5.5.65-1.el7.x86_64 (base)
               libmysqlclient.so.18()(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
           Requires: libcrypto.so.1.1()(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libssl.so.1.1()(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit)
Error: Package: mysql-community-server-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libcrypto.so.1.1()(64bit)
Error: Package: mysql-community-server-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libstdc++.so.6(GLIBCXX_3.4.22)(64bit)
Error: Package: mysql-community-server-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libssl.so.1.1()(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.60-1.el7_5.x86_64 (@base)
               libmysqlclient.so.18(libmysqlclient_18)(64bit)
           Obsoleted By: mysql-community-libs-8.0.21-1.el8.x86_64 (mysql80-commun                                                                                                                                                            ity)
               Not found
           Updated By: 1:mariadb-libs-5.5.65-1.el7.x86_64 (base)
               libmysqlclient.so.18(libmysqlclient_18)(64bit)
Error: Package: mysql-community-client-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libtinfo.so.6()(64bit)
Error: Package: mysql-community-server-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libcrypto.so.1.1(OPENSSL_1_1_1)(64bit)
Error: Package: mysql-community-server-8.0.21-1.el8.x86_64 (mysql80-community)
           Requires: libtirpc.so.3(TIRPC_0.3.0)(64bit)
 You could try using --skip-broken to work around the problem

我运行了该--skip命令,它只是重复了该部分的包error

我尝试了解决方案这里通过下载 yumutils 并删除重复项,但显然没有重复项。

我尝试了解决方案这里在 Louis 的第一个回答中,以及 Ed Moxley 的第二个回答中。两次尝试都失败了。

mysql 文档中没有任何东西(我能看到)解决这个问题。我一直在关注 mysql 的安装过程,发现这里

其他解决方案:

Mysql 文档指出您可以下载单个软件包。我尝试通过 解决其中一个缺失的依赖项sudo yum install libstdc++.so.6。此安装失败,并显示以下消息:

Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:

         1. You have an upgrade for libstdc++ which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of libstdc++ of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude libstdc++.otherarch ... this should give you an error
            message showing the root cause of the problem.

         2. You have multiple architectures of libstdc++ installed, but
            yum can only see an upgrade for one of those architectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.

         3. You have duplicate versions of libstdc++ installed already.
            You can use "yum check" to get yum show these errors.

       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).

当我尝试运行时,package-cleanup --cleandupes我被告知没有重复,这与上述错误直接矛盾......

更新:

卸载mysql后,我重新安装了mysql centos 7版本。我运行安装命令,遇到了同样的问题。输出可以看到这里

  1. 我在这里使用了以下mysql centos 7版本链接: https://dev.mysql.com/downloads/file/?id=484922(红帽下载)
  2. 我跑了wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
  3. 我跑了sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm.2
  4. 我跑了 sudo yum install -y mysql-server

第四步,当所有错误都被触发时。

非常感谢任何能帮助解决该问题的帮助。

答案1

您以某种方式安装了一个名为 的软件包,mysql80-community-release该软件包旨在用于 RHEL/CentOS 8,但您的系统是 CentOS 7。此软件包提供了下载 MySQL 的存储库,但它提供了适用于 RHEL/CentOS 8 的软件包。这在您的系统上不起作用。

您需要删除此软件包并将其替换为 CentOS 7 的等效软件包,即yum remove mysql80-community-release。完成后,您需要使用 清除 yum 的缓存yum clean all,然后才能安装正确的发布包并再次尝试安装。

或者,您可以升级到 CentOS 8,然后 CentOS 8 的软件包安装就可以了。

答案2

我尝试执行yum remove mysql80-community-releaseyum clean all,但仍然遇到与软件包依赖项相同的问题。我不得不执行yum clean all --verbose,它显示“未跟踪的存储库”下列出了缓存目录:

Disk usage under /var/cache/yum/*/* after cleanup:
0      enabled repos
7.9 M  disabled repos:
  4.8 M  /var/cache/yum/x86_64/7/myorg-elastic-6.x
  3.2 M  /var/cache/yum/x86_64/7/myorg-elastic-7.x
5.3 M  untracked repos:
  3.9 M  /var/cache/yum/x86_64/7/myorg-puppet5
  700 k  /var/cache/yum/x86_64/7/mysql80-community
  376 k  /var/cache/yum/x86_64/7/mysql-connectors-community
  340 k  /var/cache/yum/x86_64/7/mysql-tools-community
4.0 k  other data:
  4.0 k  /var/cache/yum/x86_64/7/timedhosts
13 M   total

我手动删除了 /var/cache/yum/x86_64/7/mysql* 文件夹,然后尝试了一下,sudo yum install -y mysql-server成功了。

相关内容