libaio.so.1 is needed by MySQL-server-5.5.48-1.linux2.6.i386,YumRepo Error: All mirror URLs are not

本文档详细介绍了在CentOS系统中安装MySQL时遇到的依赖问题,包括libaio.so.1和libncurses.so.5的缺失。通过查找和安装依赖包,以及修改Yum配置文件解决无法找到资源的问题。最后成功安装了MySQL的client和server版本。
摘要由CSDN通过智能技术生成

使用rpm安装MySQL-client-5.5.48-1.linux2.6.i386.rpm、MySQL-server-5.5.48-1.linux2.6.i386.rpm

直接安装会出现以下缺少依赖的问题

[root@test01 opt]# rpm -ivh MySQL-server-5.5.48-1.linux2.6.i386.rpm 
warning: MySQL-server-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
	libaio.so.1 is needed by MySQL-server-5.5.48-1.linux2.6.i386
	libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.5.48-1.linux2.6.i386
	libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.5.48-1.linux2.6.i386
[root@test01 opt]# rpm -ivh MySQL-client-5.5.48-1.linux2.6.i386.rpm 
warning: MySQL-client-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
	libncurses.so.5 is needed by MySQL-client-5.5.48-1.linux2.6.i386

查找是否有依赖(已经将libaio-0.3.107-10.el6.x86_64.rpm这个包下载好了和mysql的rpm包放在同一个目录下)

[root@test01 opt]# find -name libaio*
./libaio-0.3.107-10.el6.x86_64.rpm

#若存在其他的直接移除
[root@test01 opt]# yum -y remove libaio-0.3.107-10.el6.x86_64.rpm 

此时如果报这个错,说明需要修改yum的配置文件

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

[root@test01 opt]#vim /etc/yum.repos.d/CentOS-Base.repo 
#将原配置中的mirrorlist添加注释,并把baseurl删去注释–以base为例,其他的做同样修改
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#而baseurl链接http://mirror.centos.org/centos/已经没有资源了,重新配置资源路径https://vault.centos.org/6.8/
#修改后的配置

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=https://vault.centos.org/6.8/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=https://vault.centos.org/6.8/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=https://vault.centos.org/6.8/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=https://vault.centos.org/6.8/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
baseurl=https://vault.centos.org/6.8/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

yum配置完后,根据安装mysql报的错,进行依赖的安装

[root@test01 opt]# yum install libaio.so.1
[root@test01 opt]# yum install libncurses.so.5

在这里插入图片描述
在这里插入图片描述

安装完毕后再次安装mysql即可

[root@test01 opt]# rpm -ivh MySQL-server-5.5.48-1.linux2.6.i386.rpm 
warning: MySQL-server-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
210826  3:35:32 [Note] /usr/sbin/mysqld (mysqld 5.5.48) starting as process 33397 ...
210826  3:35:32 [Note] /usr/sbin/mysqld (mysqld 5.5.48) starting as process 33404 ...

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h test01 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

[root@test01 opt]# rpm -ivh MySQL-client-5.5.48-1.linux2.6.i386.rpm 
warning: MySQL-client-5.5.48-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:MySQL-client           ########################################### [100%]

参考博文:https://blog.csdn.net/weixin_44343282/article/details/113544092;
https://blog.csdn.net/sjgllllll/article/details/119273291

如果需要,附上libaio-0.3.107-10.el6.x86_64.rpm的包
链接:https://pan.baidu.com/s/11bEBuoLVokPWiSDZ6Tv97g
提取码:5l6r

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值