我在CentOS 7(CentOS Linux版本7.9.2009(核心))上从头开始,在一个新的服务器上试图安装MySQL(7或8)。
我已经按照我的步骤-我已经成功地完成了很多次在过去,以及许多其他网站,如:
- https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
- https://www.mysql.r2schools.com/how-to-install-mysql-8-on-centos/
- http://tecadmin.net/install-mysql-8-on-centos/#:~:text = MySQL是最新的,使用程序包管理器的Linux。
和其他许多人
所有方法都同意这些步骤:
1.下载并添加以下MySQL Yum存储库
sudo wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
- 注意 * 我尝试了不同的版本7 - 5和8
1.安装下载的软件包
sudo yum install mysql80-community-release-el7-3.noarch.rpm -y
1.安装MySQL:
sudo yum install mysql-server -y
在步骤#3中,安装失败
mysql -V
-bash: mysql: command not found
我得到了所有这些错误
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libtirpc.so.3()(64bit)
Error: Package: mysql-community-libs-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-client-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-libs-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: mysql-community-client-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libtirpc.so.3(TIRPC_0.3.3)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.22)(64bit)
Error: Package: mysql-community-client-plugins-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-client-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: mysql-community-client-plugins-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-libs-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: mysql-community-client-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.8)(64bit)
Error: Package: mysql-community-client-plugins-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.8)(64bit)
Error: Package: mysql-community-client-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libncurses.so.6()(64bit)
Error: Package: mysql-community-client-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libtinfo.so.6()(64bit)
Error: Package: mysql-community-libs-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.11)(64bit)
Error: Package: mysql-community-client-plugins-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.25)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: mysql-community-server-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libtirpc.so.3(TIRPC_0.3.0)(64bit)
Error: Package: mysql-community-client-plugins-8.0.28-1.el8.x86_64 (mysql80-community)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
我看了这个帖子,看起来很相似,但也没有运气
我能够成功安装唯一版本是一个非常旧的mysql版本:5.6
对我遗漏的内容有任何想法/建议;或者如何解决这个问题
4条答案
按热度按时间yyhrrdl81#
我想我找到了。这是我解决问题的方法。
来自:https://tecadmin.net/install-mysql-8-on-centos/
出现以下错误:
从https://forums.cpanel.net/threads/mysql-upgrade-process-failed-the-gpg-keys-listed-for-the-mysql-8-0-community-server-repository-are-already-installed-but-they-are-not-correct-for.697213/
得到与每种不同语言相关的多个警告消息;例如与"英语"相关的一个
但是,最终消息是成功的:
zzoitvuj2#
在我的情况下,我只是导入GPG-KEY:
之后,下一个命令运行无误:
3pmvbmvn3#
它确实有魔力。
sirbozc54#
我在第4步后遇到了问题,出现了一个错误:
我需要跑步:
然后安装MYSQL.发现这里〉〉MySQL won't install in CentOS due to conflict with mariadb
之后,mysql的安装就很顺利了。