安装mysql 5.7.19 rpm包报错
/usr/bin/perl is needed by mysql-community-server-5.7.19-1.el7.x86_64
一、问题描述
从mysql官网下载mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar,然后解压安装。安装顺序如下
-
rpm -ivh mysql-community-common-5.7.19-1.el7.x86_64.rpm
-
rpm -ivh mysql-community-libs-5.7.19-1.el7.x86_64.rpm
-
rpm -ivh mysql-community-libs-compat-5.7.19-1.el7.x86_64.rpm
-
rpm -ivh mysql-community-client-5.7.19-1.el7.x86_64.rpm
-
rpm -ivh mysql-community-server-5.7.19-1.el7.x86_64.rpm
前四个都没有问题,但是安装第五个mysql-community-server-5.7.19-1.el7.x86_64.rpm时报错
-
rpm -ivh mysql-community-server-5.7.19-1.el7.x86_64.rpm
-
报错:
-
warning: mysql-community-server-5.7.19-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
-
error: Failed dependencies:
-
/usr/bin/perl is needed by mysql-community-server-5.7.19-1.el7.x86_64
-
libaio.so.1()(64bit) is needed by mysql-community-server-5.7.19-1.el7.x86_64
-
libaio.so.1(LIBAIO_0.1)(64bit) is needed by mysql-community-server-5.7.19-1.el7.x86_64
-
libaio.so.1(LIBAIO_0.4)(64bit) is needed by mysql-community-server-5.7.19-1.el7.x86_64
-
net-tools is needed by mysql-community-server-5.7.19-1.el7.x86_64
-
perl(Getopt::Long) is needed by mysql-community-server-5.7.19-1.el7.x86_64
-
perl(strict) is needed by mysql-community-server-5.7.19-1.el7.x86_64
二、问题原因
很简单,如错误信息显示,缺少net-tools.x86_64,libaio.x86_64,perl.x86_64三个依赖,使用yum安装即可。
三、问题解决
1.查找依赖对应包
-
yum search perl
-
yum search libaio
-
yum search net-tools
2.yum安装对应包
-
yum -y install perl.x86_64
-
yum install -y libaio.x86_64
-
yum -y install net-tools.x86_64
总之,仔细看报错信息!