[root@NEC-IA32-03 ft]# rpm -e xxxx
ERROR: yyyy is running.
error: %preun(xxx.i386) scriptlet failed, exit status 1
通过ps -ef|grep yyyy
发现程序yyyy并未在进程列表里面
restart后也还是有相同问题。
解决方案:rpm 使用--noscripts参数。
参照rpm的man文件:
--noscripts
--nopreun
--nopostun
Don't execute the scriptlet of the same name. The --noscripts option during package erase is equivalent to
--nopreun --nopostun
and turns off the execution of the corresponding %preun, and %postun scriptlet(s).
估计使用--nopreun也可以解决。