yum安装依赖查找

@TOC

背景

在centos7 上离线安装 mysql-8.0.30-1.el7.x86_64.rpm-bundle.tar
大体按依赖顺序

rpm -ivh mysql-community-common-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-compat-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-embedded-compat-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-test-8.0.13-1.el7.x86_64.rpm

当安装到 test 时,报缺少依赖库 perl(Test::More),直接用 yum install perl(Test::More)直接就报错,怎么正确找到对应依赖库成了难题,这里做个记录

查找依赖库

  1. 使用网站:https://rhel.pkgs.org/
  2. 直接查找模块:https://rhel.pkgs.org/7/mysql-8.0-x86_64/mysql-community-test-8.0.30-1.el7.x86_64.rpm.html
  3. 找到其依赖:Requires 85页面有perl(Test::More)链接
  4. 定位perl(Test::More):https://centos.pkgs.org/7/centos-x86_64/perl-Test-Simple-0.98-243.el7.noarch.rpm.html
  5. 找到其安装方法:Install Howto页面yum install perl-Test-Simple即可解决。

这个安装模块,和报错名称完全就两码事

你可能感兴趣的:(mysql,yum,perl,centos,linux)