Ubuntu16.04 LTS:无法下载软件包文件。请检查您的互联网连接

Ubuntu16.04 LTS:无法下载软件包文件。请检查您的互联网连接

我意识到这个问题已经被问过多次了,我也浏览了答案并尽可能地尝试了其中的建议。但问题仍然存在。

由于问题中的一些回复建议复制粘贴的结果sudo apt-get update,我将其添加到这里,并删除了列出的链接,因为我的声誉不够好,不允许发布超过两个这样的链接。

Hit:1 http://archive.canonical.com/ubuntu lucid InRelease
Hit:2
Hit:3
Hit:4
Hit:5
Ign:6
Hit:7
Hit:8
Hit:9
Reading package lists... Done                      
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Translations (partner/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target DEP-11 (partner/dep11/Components-i386.yml) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: http://archive.canonical.com/ubuntu/dists/lucid/InRelease: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Translations (partner/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target DEP-11 (partner/dep11/Components-i386.yml) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/lucid-partner.list:4 and /etc/apt/sources.list.d/maverick-partner.list:4

任何帮助是极大的赞赏。

答案1

打开终端(++ ctrl)并执行以下操作来修复源列表问题:altt

sudo rm /etc/apt/sources.list.d/maverick-partner.list
sudo rm /etc/apt/sources.list.d/lucid-partner.list

这将删除那些导致您出错的旧文件,并且可能在您更新之前已经导致您出错。

你最好也确保你的/etc/apt/sources.list包含正确的链接。下面我给你发布了一个 16.04 LTS 源列表版本,其中启用了所有包源。只需将sudo nano /etc/apt/sources.list内容替换为以下块:

#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

将光标放在第一行开头并按ctrl+k直到所有行都消失,然后在此处复制块并使用ctrl+ shift+将其粘贴到文件中,即可快速删除文件内容。我只是将整个文件压缩为几行,这样就不会占用太多空间。您可以做的另一件事是,检查所有提及版本字的v行是否都包含。httpsources.listxenial

完成后,按ctrl+结束编辑x,按y保存并return确认文件名。

之后运行sudo apt-get update && sudo apt-get dist-upgrade,然后简单地使用提供的 GUI 工具来更改您想要打开的存储库。

相关内容