我试图通过以下命令降级RPM:
# RPM install
sudo rpm -Uvh --oldpackage rpm-name-oldversion
# Yum install
sudo yum --nogpgcheck downgrade localinstall rpm-name-oldversion
然而,两个RPM都显示为已安装,对我来说没有意义。
注意:我自己构建了这些RPM并且在CentOS / Redhat机器上。
更新1:调试已开启
(我从头开始删除所有包裹)
sudo yum localinstall my-package-1.5.5-1.x86_64.rpm
rpm -qa | grep my-package
my-package-1.5.5-1
yum --nogpgcheck downgrade localinstall -d10 my-package-1.5.3-1.x86_64.rpm
Downloading Packages:
Running rpm_check_debug
Member: my-package.x86_64 0-1.5.3-1 - u
Adding Package my-package-1.5.3-1.x86_64 in mode u
Member: my-package.x86_64 0-1.5.5-1 - e
Removing Package my-package-1.5.5-1.x86_64
rpm_check_debug time: 0.066
Running Transaction Test
Member: my-package.x86_64 0-1.5.3-1 - u
Adding Package my-package-1.5.3-1.x86_64 in mode u
Member: my-package.x86_64 0-1.5.5-1 - e
Removing Package my-package-1.5.5-1.x86_64
Finished Transaction Test
Transaction Test Succeeded
Transaction Test time: 0.275
Member: my-package.x86_64 0-1.5.3-1 - u
Adding Package my-package-1.5.3-1.x86_64 in mode u
Member: my-package.x86_64 0-1.5.5-1 - e
Removing Package my-package-1.5.5-1.x86_64
Removed:
my-package.x86_64 0:1.5.5-1
Installed:
my-package.x86_64 0:1.5.3-1
Complete!
rpm -qa | grep my-package
my-package-1.5.5-1
my-package-1.5.3-1
更新2:适用于其他服务器
我正在关闭此主题,因为它似乎可以在另一台服务器上运行,因此我会继续调查。
答案 0 :(得分:0)
您可能已安装多个软件包实例。
尝试" rpm -qa | grep rpm-name"看看有多少个实例 您正在降级的软件包已注册 在rpm数据库中。