删除软件包时PREUN scriptlet中的yum错误


16

尝试卸载zarafa邮件服务器。

yum list installed用来查看已经安装的软件包。

之后我用 yum erase zarafa*

它拾取所有包,但返回:

Error in PREUN scriptlet in rpm package zarafa-dagent
Error in PREUN scriptlet in rpm package zarafa-gateway
Error in PREUN scriptlet in rpm package zarafa-monitor
Error in PREUN scriptlet in rpm package zarafa-server
Error in PREUN scriptlet in rpm package zarafa-spooler
Error in PREUN scriptlet in rpm package zarafa-ical
zarafa-ical-7.1.9-1.el6.i686 was supposed to be removed but is not!
  Verifying  : zarafa-ical-7.1.9-1.el6.i686                                                                                                                                                1/6 
zarafa-spooler-7.1.9-1.el6.i686 was supposed to be removed but is not!
  Verifying  : zarafa-spooler-7.1.9-1.el6.i686                                                                                                                                             2/6 
zarafa-server-7.1.9-1.el6.i686 was supposed to be removed but is not!
  Verifying  : zarafa-server-7.1.9-1.el6.i686                                                                                                                                              3/6 
zarafa-monitor-7.1.9-1.el6.i686 was supposed to be removed but is not!
  Verifying  : zarafa-monitor-7.1.9-1.el6.i686                                                                                                                                             4/6 
zarafa-gateway-7.1.9-1.el6.i686 was supposed to be removed but is not!
  Verifying  : zarafa-gateway-7.1.9-1.el6.i686                                                                                                                                             5/6 
zarafa-dagent-7.1.9-1.el6.i686 was supposed to be removed but is not!
  Verifying  : zarafa-dagent-7.1.9-1.el6.i686                                                                                                                                              6/6 

Failed:
  zarafa-dagent.i686 0:7.1.9-1.el6      zarafa-gateway.i686 0:7.1.9-1.el6     zarafa-ical.i686 0:7.1.9-1.el6     zarafa-monitor.i686 0:7.1.9-1.el6     zarafa-server.i686 0:7.1.9-1.el6    
  zarafa-spooler.i686 0:7.1.9-1.el6  

1
搜索Error in PREUN scriptlet in rpm package ddclient 并来到这里-谢谢。
费利佩·阿尔瓦雷斯

Answers:


47

我想似乎百胜缓存数据和rpm数据库彼此之间是不同步的。尝试运行以下命令:

su -c 'yum clean all && rpm --rebuilddb'
su -c 'package-cleanup --problems'

然后运行:

su -c 'yum erase zarafa*'

编辑1:尝试运行下一条命令:

# su -c 'yum --setopt=tsflags=noscripts remove zarafa*'

如果这不起作用,请尝试以下操作:

# su -c 'rpm -e --noscripts zarafa*'

很好的尝试,但是还是失败了
Krauser 2014年

是的,完全一样
Krauser 2014年

4
而来自我的编辑#1的命令呢?
Itai Ganot

--setopt = tsflags = noscripts很好,谢谢!
andrej 2015年

5
yum --setopt=tsflags=noscripts remove <pkgname>为我工作
费利佩·阿尔瓦雷斯

8

我做了一个rpm -ql <packagename>看包裹的原始内容。

手动删除任何剩余的文件。

如上所述,使用noscripts标志运行yum,因此脚本不会失败。

yum --setopt=tsflags=noscripts remove <packagename>
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.