Ubuntu 16.04 LTS 软件中心不工作

Ubuntu 16.04 LTS 软件中心不工作

我尝试重新安装 gnome 软件,但是失败了。

终端截图:

图像

请发布此问题的解决方案。

答案1

通过 成为 root 后,在终端中执行以下操作sudo su。您可以将以下代码块整块复制并粘贴 ( ++ ctrl)到您的终端,然后按一次回车键完成并返回到您的普通用户:shiftv

mv /etc/apt/sources.list{,.repairbackup}
cat > /etc/apt/sources.list << EOF
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu xenial-proposed main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
EOF
exit

这将在修复问题的同时打开所有存储库并删除可能添加的存储库,这些存储库在/etc/apt/sources.list此列表中有条目,因此此过程会将您之前的现有sources.list文件保存到其中,sources.list.repairbackup以便您可以查看它们并查找错误。要从此列表中添加或删除存储库,请使用“系统设置”对话框。

相关内容