依赖检查命令为 rpm -qa perl-DBI perl-DBD-MySQL perl-Time-HiRes perl-IO-Socket-SSL
应该有以上四个依赖包,如果没有,请使用下面的命令安装
yum install perl-DBI
yum install perl-DBD-MySQL
yum install perl-Time-HiRes
yum install perl-IO-Socket-SSL
参照:https://www.percona.com/doc/percona-toolkit/3.0/installation.html#installing-percona-toolkit-on-red-hat-or-centos
# yum install -y http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
yum list | grep percona-toolkit
yum install -y percona-toolkit
出现以下页面即为成功
如果这一步出现了错误,
The GPG keys listed for the "Percona-Release YUM repository - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
Failing package is: Percona-Server-shared-56-5.6.45-rel86.1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
yum update percona-release
Transaction check error:
file /etc/my.cnf from install of Percona-Server-shared-56-5.6.45-rel86.1.el7.x86_64 conflicts with file from package mysql-community-server-8.0.17-1.el7.x86_64
Error Summary
这里说明提示在my.cnf文件中, Percona-Server-shared与mysql-community-server冲突,需要安装mysql-community-libs-compat 才可以搞定
[root@VM_0_10_centos src]# more /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@VM_0_10_centos src]# rpm -qa|grep -i mysql
mysql-community-common-8.0.17-1.el7.x86_64
mysql-community-libs-8.0.17-1.el7.x86_64
mysql-community-server-8.0.17-1.el7.x86_64
mysql-community-client-8.0.17-1.el7.x86_64
通过上面的查看,确实没有libs-compat包安装到本机,可以通过两个办法解决,一个是通过yum直接下载mysql-community-libs-compat(如果之前你是使用yum安装mysql的话),而我是使用本地文件解压安装,所以要去本地的文件夹下找到这个安装包,将其安装。
yum install mysql-community-libs-compat -y
找到当成安装mysql的解压包
在当前路径下使用rpm -ivh mysql-community-libs-compat-8.0.17-1.el7.x86_64.rpm --nodeps --force安装
rpm -ivh mysql-community-libs-compat-8.0.17-1.el7.x86_64.rpm --nodeps --force
成功解决该问题
yum install -y percona-toolkit
成功安装,接下来可以探索其他的玩法了!
参考博文链接:https://www.cnblogs.com/h--d/p/9320776.html
https://aqzt.com/5366.html