有没有办法在使用 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 来做到这一点。以下是有效的方法: