Linux
安裝過時的包而不刪除過時的包
有沒有辦法在使用 yum 過時的軟體包旁邊安裝過時的軟體包?有幾個衝突的文件,但這些包可以與這些文件的最新版本共存。
過時軟體包的正常安裝會刪除過時的軟體包:
# rpm -qa | grep tc-server vfabric-tc-server-standard-2.9.7-RELEASE.noarch # yum -y install pivotal-tc-server-standard vfabric-tc-server-standard ---> Package pivotal-tc-server-standard.noarch 0:3.2.1-RELEASE will be obsoleting ---> Package vfabric-tc-server-standard.noarch 0:2.9.7-RELEASE will be obsoleted ... ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: pivotal-tc-server-standard noarch 3.2.1-RELEASE pivotal-app-suite 34 M replacing vfabric-tc-server-standard.noarch 2.9.7-RELEASE ... Running Transaction Installing : pivotal-tc-server-standard-3.2.1-RELEASE.noarch 1/2 Erasing : vfabric-tc-server-standard-2.9.7-RELEASE.noarch 2/2 Installed: pivotal-tc-server-standard.noarch 0:3.2.1-RELEASE Replaced: vfabric-tc-server-standard.noarch 0:2.9.7-RELEASE # rpm -qa | grep tc-server pivotal-tc-server-standard-3.2.1-RELEASE.noarch
我試過:
yum -y --setopt=obsoletes=0 install pivotal-tc-server-standard vfabric-tc-server-standard yum -y install pivotal-tc-server-standard --exclude=vfabric-tc-server-standard
這似乎與正常安裝沒有什麼不同。
我也試過:
# yum install pivotal-tc-server-standard --setopt=protected_packages=vfabric-tc-server-standard ---> Package pivotal-tc-server-standard.noarch 0:3.2.1-RELEASE will be obsoleting ---> Package vfabric-tc-server-standard.noarch 0:2.9.7-RELEASE will be obsoleted Error: Trying to remove "vfabric-tc-server-standard", which is protected
我還沒有弄清楚如何使用 yum 來做到這一點。以下是有效的方法:
# yum -y install yum-utils # yumdownloader pivotal-tc-server-standard # rpm -i --replacefiles pivotal-tc-server-standard-X.X.X-RELEASE.noarch.rpm # rpm -qa | grep tc-server vfabric-tc-server-standard-2.9.7-RELEASE.noarch pivotal-tc-server-standard-3.2.1-RELEASE.noarch