如何在 yum 升级中使用 RPM 选项?
我需要升级通过 YUM 安装的 RPM,它的 postun 部分有一个致命错误。
当我运行“yum update”时,这将运行(并删除程序的用户,这是我不希望发生的情况)。
我知道如果我直接使用 rpm,我可以使用“-nopostun”选项来跳过本节,但我没有看到从 yum 的手册页访问该选项的方法。
有人知道解决这个问题的方法吗?
I need to upgrade an RPM installed via YUM, which has an fatal bug in its postun section.
This will get run (and delete the program's user, which is what I want to not happen) when I run "yum upgrade".
I know that if I were using rpm directly, I could just use the "-nopostun" option to skip this section, but I don't see a way of accessing that option from yum's man page.
Anyone know a way round this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
(回答我自己的问题...)
看起来好像可能就像执行“rpm --erase --nopostun”来删除坏的 rpm 一样简单,然后运行“yum install”来重新安装好的新版本。
(Answering my own question...)
It looks as though it might be as simple as doing "rpm --erase --nopostun" to remove the bad rpm, and then running "yum install" to reinstall the good new version.
还有可以使用的“yum-tsflags”插件,这意味着您仍然可以在最近的 yum 中获得历史记录等……但它应该很少见,所以并不重要。
There is also the "yum-tsflags" plugin which can be used, which means you still get history etc. in recent yum ... but it should be so rare it doesn't matter too much.