我在使用软件中心时遇到了一些问题。因此尝试重新安装它。但在删除它时出现错误。
(Reading database ... 150986 files and directories currently installed.)
Removing software-center ...
dpkg: error processing software-center (--remove):
unable to securely remove '/usr/share/app-install/desktop/software-center.menu': Not a directory
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Errors were encountered while processing:
software-center
E: Sub-process /usr/bin/dpkg returned an error code (1)
现在,如果我使用 apt-get 安装或升级我的 ubuntu,同样的问题会重复出现。我无法安装任何软件和软件中心。请帮忙
答案1
/usr/share/app-install/desktop/software-center.menu
不应该是一个目录,而是一个文件。
尝试直接删除它:sudo rm /usr/share/app-install/desktop/software-center.menu
然后重新安装:sudo apt-get --reinstall install software-center