![无法从终端获取 apt-get 更新,现在该怎么办?](https://linux22.com/image/1385278/%E6%97%A0%E6%B3%95%E4%BB%8E%E7%BB%88%E7%AB%AF%E8%8E%B7%E5%8F%96%20apt-get%20%E6%9B%B4%E6%96%B0%EF%BC%8C%E7%8E%B0%E5%9C%A8%E8%AF%A5%E6%80%8E%E4%B9%88%E5%8A%9E%EF%BC%9F.png)
每当我尝试从终端更新时,都会出现此错误:
root@Utkarsh[utkarsh]#apt-get update
Hit http://packages.bosslinux.in anokha Release.gpg
Hit http://packages.bosslinux.in anokha Release
Hit http://packages.bosslinux.in anokha/contrib Sources
Hit http://packages.bosslinux.in anokha/non-free Sources
Hit http://packages.bosslinux.in anokha/main Sources
Hit http://packages.bosslinux.in anokha/contrib i386 Packages
Hit http://packages.bosslinux.in anokha/non-free i386 Packages
Hit http://packages.bosslinux.in anokha/main i386 Packages
Ign http://packages.bosslinux.in anokha/contrib Translation-en_US
Ign http://packages.bosslinux.in anokha/contrib Translation-en
Ign http://packages.bosslinux.in anokha/main Translation-en_US
Ign http://packages.bosslinux.in anokha/main Translation-en
Ign http://packages.bosslinux.in anokha/non-free Translation-en_US
Ign http://packages.bosslinux.in anokha/non-free Translation-en
Reading package lists... Done
W: Duplicate sources.list entry http://packages.bosslinux.in/boss/ anokha/main i386 Packages (/var/lib/apt/lists/packages.bosslinux.in_boss_dists_anokha_main_binary-i386_Packages)
W: Duplicate sources.list entry http://packages.bosslinux.in/boss/ anokha/contrib i386 Packages (/var/lib/apt/lists/packages.bosslinux.in_boss_dists_anokha_contrib_binary-i386_Packages)
W: Duplicate sources.list entry http://packages.bosslinux.in/boss/ anokha/non-free i386 Packages (/var/lib/apt/lists/packages.bosslinux.in_boss_dists_anokha_non-free_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
答案1
W: Duplicate sources.list entry http://packages.bosslinux.in/boss/ anokha/main i386 Packages (/var/lib/apt/lists/packages.bosslinux.in_boss_dists_anokha_main_binary-i386_Packages)
W: Duplicate sources.list entry http://packages.bosslinux.in/boss/ anokha/contrib i386 Packages (/var/lib/apt/lists/packages.bosslinux.in_boss_dists_anokha_contrib_binary-i386_Packages)
W: Duplicate sources.list entry http://packages.bosslinux.in/boss/ anokha/non-free i386 Packages (/var/lib/apt/lists/packages.bosslinux.in_boss_dists_anokha_non-free_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
那不是错误。那只是一个警告。
您可以根据需要删除重复的条目/etc/apt/sources.list
,但这不是必需的。有关更具体的答案,请参阅:如何修复重复的 sources.list 条目?