如何根据包依赖性

时间:2017-08-16 01:57:02

标签: local rpm yum

我想在没有网络的情况下更新yum。

两个阶段:

第一步,在网络连接的机器上下载软件包:

yum update --downloadonly --downloaddir=/local-dir

第二步,在非网络机器上安装下载的软件包:

rpm -ivh /local-dir/*

但是第二步将失败并出现错误,/local-dir中存在失败的依赖关系,但rpm不会自动检测到它。

error: Failed dependencies:
        selinux-policy < 3.13.1-89 conflicts with firewalld-0.4.3.2-8.1.el7_3.3.noarch
        NetworkManager < 1:1.4.0-3.el7 conflicts with firewalld-0.4.3.2-8.1.el7_3.3.noarch
        firewalld < 0.3.13 conflicts with firewalld-filesystem-0.4.3.2-8.1.el7_3.3.noarch
        systemd < 219-20 conflicts with libselinux-2.5-6.el7.x86_64
        selinux-policy-base < 3.13.1-66 conflicts with libsemanage-2.5-5.1.el7_3.x86_64
        selinux-policy < 3.13.1-92 conflicts with openssh-6.6.1p1-35.el7_3.x86_64
        firewalld < 0.3.14 conflicts with python-firewall-0.4.3.2-8.1.el7_3.3.noarch

1 个答案:

答案 0 :(得分:0)

使用rpm -Uvvh /local-dir/*

 {-U|-upgrade} This  upgrades  or  installs  the  package  currently installed 
  to a newer version.  This is the same as install, 
  except all other version(s) of the package are
  removed after the new package is installed.
相关问题