我尝试emacs
使用该命令从 Fedora 32 系统中删除该软件包dnf remove emacs
,但是当我删除它时,会发生这种情况:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: emacs-1:26.3-2.fc32.x86_64 1/1
error: %preun(emacs-1:26.3-2.fc32.x86_64) scriptlet failed, exit status 2
Error in PREUN scriptlet in rpm package emacs
Verifying : emacs-1:26.3-2.fc32.x86_64 1/1
Failed:
emacs-1:26.3-2.fc32.x86_64
Error: Transaction failed
该emacs
包随后不是已删除。我该如何删除包含失败 scriptlet 的包,最好使用 dnf? (而不是直接使用 rpm)
答案1
这已经被描述过,例如这里:https://serverfault.com/questions/613256/yum-error-in-preun-scriptlet-when-removing-packages
YUM 已被 DNF 取代,但此选项保持不变。
dnf --setopt=tsflags=noscripts
还是rpm --noscripts
应该有窍门。