yum依赖-mysql安装_yum install mysql-community-server依赖关系错误

CentOS MySQL5.7 安装问题解决
部署运行你感兴趣的模型镜像

该解决方案为卸载重装;如果看客不能卸载,请直接关闭

系统:Centos 6.9

MySQL 版本:MySQL 5.7

由于本人以前买了个 Centos 6.9 国外服务器玩并安装了mysql;后来因为忙所以就把服务器搁置了,最近闲下来又开始捣鼓起来。

最开始忘记 mysql 的配置信息,所以想要更新下 mysql;按照网上的方式使用;但是再输入如下指令的

yum install mysql-community-server

结果报如下错误:

[root@host ~]# yum install mysql-community-server

Loaded plugins: fastestmirror

Setting up Install Process

Loading mirror speeds from cached hostfile

* base: mirror.san.fastserv.com

* elrepo-kernel: repos.lax-noc.com

* extras: mirrors.oit.uci.edu

* updates: mirror.keystealth.org

Resolving Dependencies

--> Running transaction check

---> Package mysql-community-server.x86_64 0:5.7.20-1.el7 will be installed

--> Processing Dependency: mysql-community-common(x86-64) = 5.7.20-1.el7 for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: systemd for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: systemd for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libnuma.so.1()(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Running transaction check

---> Package mysql-community-client.x86_64 0:5.7.20-1.el7 will be installed

--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.20-1.el7.x86_64

--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-client-5.7.20-1.el7.x86_64

--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-client-5.7.20-1.el7.x86_64

---> Package mysql-community-common.x86_64 0:5.7.20-1.el7 will be installed

---> Package mysql-community-server.x86_64 0:5.7.20-1.el7 will be installed

--> Processing Dependency: systemd for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: systemd for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

---> Package numactl.x86_64 0:2.0.9-2.el6 will be installed

--> Running transaction check

---> Package mysql-community-client.x86_64 0:5.7.20-1.el7 will be installed

--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-client-5.7.20-1.el7.x86_64

--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-client-5.7.20-1.el7.x86_64

---> Package mysql-community-libs.x86_64 0:5.7.20-1.el7 will be installed

--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: mysql-community-libs-5.7.20-1.el7.x86_64

---> Package mysql-community-server.x86_64 0:5.7.20-1.el7 will be installed

--> Processing Dependency: systemd for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: systemd for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Processing Dependency: libsasl2.so.3()(64bit) for package: mysql-community-server-5.7.20-1.el7.x86_64

--> Finished Dependency Resolution

Error: Package: mysql-community-server-5.7.20-1.el7.x86_64 (mysql57-community)

Requires: libsasl2.so.3()(64bit)

Error: Package: mysql-community-client-5.7.20-1.el7.x86_64 (mysql57-community)

Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)

Error: Package: mysql-community-libs-5.7.20-1.el7.x86_64 (mysql57-community)

Requires: libc.so.6(GLIBC_2.14)(64bit)

Error: Package: mysql-community-server-5.7.20-1.el7.x86_64 (mysql57-community)

Requires: systemd

Error: Package: mysql-community-server-5.7.20-1.el7.x86_64 (mysql57-community)

Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)

Error: Package: mysql-community-client-5.7.20-1.el7.x86_64 (mysql57-community)

Requires: libc.so.6(GLIBC_2.14)(64bit)

Error: Package: mysql-community-server-5.7.20-1.el7.x86_64 (mysql57-community)

Requires: libc.so.6(GLIBC_2.17)(64bit)

You could try using --skip-broken to work around the problem

You could try running: rpm -Va --nofiles --nodigest

查询各种信息;基本确定是因为 mysql 的依赖问题;由于对本来说,最快的解决方案就是卸载重装.

卸载方法:

1.快速删除

yum remove mysql mysql-server mysql-libs mysql-server

2.查找残留文件

rpm -qa | grep -i mysql

将查询出来的文件逐个删除,如:

yum remove mysql-community-common-5.7.20-1.el6.x86_64

4.查找残留目录

whereis mysql

逐条删除目录,如:

rm –rf /usr/lib64/mysql

上述做完后,最好重新查询相关内容,防止漏删

安装:

检测系统是否存在mysql

yum list installed | grep mysql

删除mysql依赖项

yum -y remove mysql-libs.x86_64

3.给CentOS添加rpm源,并且选择较新的源

wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

yum localinstall mysql-community-release-el6-5.noarch.rpm

yum repolist all | grep mysql

yum-config-manager --disable mysql55-community

yum-config-manager --disable mysql56-community

yum-config-manager --enable mysql57-community-dmr

yum repolist enabled | grep mysql

安装mysql 服务器

# yum install mysql-community-server

终于没有报错,可以继续了

您可能感兴趣的与本文相关的镜像

EmotiVoice

EmotiVoice

AI应用

EmotiVoice是由网易有道AI算法团队开源的一块国产TTS语音合成引擎,支持中英文双语,包含2000多种不同的音色,以及特色的情感合成功能,支持合成包含快乐、兴奋、悲伤、愤怒等广泛情感的语音。

### 安装方法 - **未更新安装源时安装 PHP 及相关组件**:若 yum 未更新安装源,PHP 版本为 5,可使用以下命令安装 PHP 及相关组件,同时可添加 httpd 和 mysql 进行安装: ```bash yum install -y httpd php php-fpm php-server php-mysql mysql ``` - **更新 PHP 安装源后安装 PHP 7.2 及相关组件**: - 首先更新 PHP 安装源: ```bash rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm ``` - 然后安装 PHP 7.2 及相关扩展,同时添加 httpd 和 mysql 进行安装: ```bash yum install -y httpd php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml mysql ``` ### 注意事项 - **依赖冲突问题**:在安装过程中可能会遇到依赖冲突,如安装 `php-mysql` 时可能会出现与 `php-mysqlnd` 冲突的情况。例如执行 `yum -y install php-mysql` 时,可能会出现错误提示 `php-mysql conflicts with php-mysqlnd-5.4.16 - 46.el7.x86_64`。此时可以尝试添加 `--skip-broken` 选项来解决该问题,也可以尝试执行 `rpm -Va --nofiles --nodigest` [^3]。 - **MySQL 源问题**:如果需要安装 MySQL,推荐使用 MySQL 官方提供的 yum 源。可以点击下载想要的 MySQL 版本 yum 源的 rpm 包,并传到服务器上,执行 `rpm -Uvh` 下载的 RPM 包;也可以直接执行 `rpm -Uvh https://dev.mysql.com/get/mysql57 - community - release - el7 - 11.noarch.rpm` [^5]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值