当我尝试安装某个软件包时,rpm 会告诉我该软件包已安装。当我尝试删除同一个软件包时,它会告诉我该软件包尚未安装。强制安装失败(可能是因为该软件包已安装),无法强制删除。您知道这是怎么回事吗?
[ecarroll@x200s extensions]$ sudo rpm -i /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
warning: /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 39256cb2: NOKEY
package gnome-shell-frippery-0.1.0-1.noarch is already installed
[ecarroll@x200s extensions]$ sudo rpm -e /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
error: package /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm is not installed
力安装:
[ecarroll@x200s extensions]$ sudo rpm --force -i /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
warning: /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 39256cb2: NOKEY
[ecarroll@x200s extensions]$ sudo rpm -e /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
error: package /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm is not installed
强制删除:
[ecarroll@x200s extensions]$ sudo rpm --force -e /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
rpm: only installation and upgrading may be forced
答案1
安装的软件包包括不是软件包文件名引用时,您必须使用其名称、版本等来引用它们。您可以通过rpm -qp
针对相应的软件包文件运行来获取上述信息。
TL; DR:问题不是RPM,是您。