![似乎我(完全)删除了 Artful 的默认存储库,我该如何恢复它?](https://linux22.com/image/1151286/%E4%BC%BC%E4%B9%8E%E6%88%91%EF%BC%88%E5%AE%8C%E5%85%A8%EF%BC%89%E5%88%A0%E9%99%A4%E4%BA%86%20Artful%20%E7%9A%84%E9%BB%98%E8%AE%A4%E5%AD%98%E5%82%A8%E5%BA%93%EF%BC%8C%E6%88%91%E8%AF%A5%E5%A6%82%E4%BD%95%E6%81%A2%E5%A4%8D%E5%AE%83%EF%BC%9F.png)
我不知道它是怎么发生的,但它不知怎么被删除了。它是永远消失了吗?还是我可以重新添加 17.10 附带的默认存储库?它甚至似乎没有在软件和更新频道中显示为已禁用。谢谢,问候,托马斯
答案1
只需打开软件和更新,在第一个选项卡中重新设置您的选择,从下拉列表中选择一个服务器。执行此操作时,您应该会收到输入密码的请求。(见屏幕截图)
这通常应该可以解决问题。
或者,您可以sudo -i
在终端中使用并将以下内容(完整块)复制并粘贴到其中:
cat > /etc/apt/sources.list << EOF
deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu artful-proposed restricted main universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu artful-proposed restricted main universe multiverse
deb http://archive.canonical.com/ubuntu artful partner
deb-src http://archive.canonical.com/ubuntu artful partner
EOF
之后你应该使用exit
退出 root 权限。这应该也能解决问题。