重复的 sources.list 条目

重复的 sources.list 条目

使用 Ubuntu 14.04 LTS。

sudo apt-get update

这就是我所运行的全部内容,一开始非常顺利,然后到达某个部分,卡住相当长一段时间,之后会显示这个错误。

W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_restricted_binary-amd64_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_restricted_binary-i386_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-amd64_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-i386_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_restricted_binary-amd64_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_multiverse_binary-amd64_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_restricted_binary-i386_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_multiverse_binary-i386_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-amd64_Packages)
    W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-security/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-i386_Packages)
    W: You may want to run apt-get update to correct these problems

当然,它建议的建议不会起作用,因为正是在运行该命令后,我遇到了错误。我尝试创建一个新的 sources.list 文件,而且,在更新程序设置的“其他软件”选项卡中,我发现了两个“规范合作伙伴”,因此我删除了其中一个。但它仍然不起作用。错误提示了许多列表...我检查了一个,但无法理解其中的意思。

另外,我手动安装了 32 位架构,以便能够使用 skype

答案1

您声明:“此外,我手动安装了 32 位架构,以便能够使用 skype”如果您需要与 32 位代码完全兼容,则应安装 i386 版本。无论如何,您可以通过仔细编辑 /etc/apt/sources.list 来解决这个问题

sudo gedit /etc/apt/sources.list

确保每个存储库只出现一次。

或者从同一位置的实时 cd/dvd/usb 复制原始 sources.list 文件。或者更好的方法是参考这个:如何修复重复的 sources.list 条目? 仔细查看警告就会明白。仔细查看此示例,您会发现不同架构的源重复:

W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-amd64_Packages)
W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-i386_Packages)

答案2

正如 Elder Greek 所观察到的,您同时拥有 i386 32 位和 amd_64 位条目。如果您有 synaptic 或

sudo apt-get 安装 synaptic

当您在设置 → 存储库 → 其他软件下运行它时,您将找到所有存储库的列表。

删除 i386 条目并重新加载(更新)。

如果还有重复项,它会告诉您,以便您检查并删除。

相关内容