我们正在自动化一些卸载/安装 RPM 的部署脚本。我在不止一台主机上看到 rpm -qa 返回如下内容:
# rpm -qa | grep tcl
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
Run Code Online (Sandbox Code Playgroud)
使用 rpm -e 和 rpm -i 是如何发生的?有没有办法防止这种情况?如果我在这种情况下运行 rpm -e,我会得到
# rpm -e tcl-8.5.7-6.el6
error: "tcl-8.5.7-6.el6" specifies multiple packages:
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
Run Code Online (Sandbox Code Playgroud)
所以我不得不使用-vv --allmatches --nodeps --noscripts --notriggers开关
阿农,
rpm --rebuilddb如果您还没有尝试的话,您现在可以尝试吗?
http://www.rpm.org/max-rpm/rpm.8.html
或者,您可以使用yum install, 代替 吗rpm?Yum 通常会更好地管理您的数据库。
| 归档时间: |
|
| 查看次数: |
8327 次 |
| 最近记录: |