6

My Perl code installed several (4) rpm files as root. the next install removes them (rpm -e) before installing a newer version. One does not remove, with rpm -e giving the error that it is not installed. However, later when the updated file is installed, the message is given that it is already installed.

Manual attempts to remove give the same results. My questions are how to force removal something from the rpm database, and why does this contradication exist (not installed from rpm -e and already installed from rpm -Uvh and rpm -ivh)?

4

3 回答 3

12
  1. 安装后,使用包名,而不是包文件名。
  2. 在升级之前,您不需要删除软件包。这样做意味着其中一个或两个包都损坏了。
于 2010-05-16T00:00:04.880 回答
9

它没有被删除的原因很可能是因为其中一个小脚本失败了。手动执行并注意错误。如果它提到了一个失败的 scriptlet,请尝试使用rpm -e --noscripts

于 2014-06-26T22:18:01.567 回答
3

rpm -e --force不会强行删除一个包,而是rpm -e --nodeps 通过停止它来检查其他依赖项。

您的 RPM 数据库可能以某种方式变形,您不妨尝试rpm --rebuilddb

于 2010-05-16T01:03:37.740 回答