无法从终端获取 apt-get 更新,现在该怎么办?

无法从终端获取 apt-get 更新,现在该怎么办?

每当我尝试从终端更新时,都会出现此错误:

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 条目?

答案2

apt-get update表现正常。这些是警告。注意到W:行前面的 s 了吗?

apt-get update什么

如果您想更新您的系统(使用 apt-get 安装的软件包),请使用apt-get upgrade

此外,阅读恰当的教程。

相关内容