【问题】
在执行sudo apt-get update 之后,出现错误:
。。。
正在读取软件包列表… 完成
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/main Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_main_binary-i386_Packages)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/main Translation-zh_CN (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_main_i18n_Translation-zh%5fCN)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/restricted Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_restricted_binary-i386_Packages)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/restricted Translation-zh_CN (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_restricted_i18n_Translation-zh%5fCN)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/universe Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_universe_binary-i386_Packages)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/universe Translation-zh_CN (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_universe_i18n_Translation-zh%5fCN)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/multiverse Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_multiverse_binary-i386_Packages)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic/multiverse Translation-zh_CN (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic_multiverse_i18n_Translation-zh%5fCN)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic-updates/main Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic-updates_main_binary-i386_Packages)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic-updates/restricted Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic-updates_restricted_binary-i386_Packages)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic-updates/universe Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic-updates_universe_binary-i386_Packages)
W: Duplicate sources.list entry http://cn.archive.ubuntu.com karmic-updates/multiverse Packages (/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_karmic-updates_multiverse_binary-i386_Packages)
W: 您可能需要运行 apt-get update 来解决这些问题
【解决过程】
提示:
对于连sources.list文件都不知道是啥的人,请先去看这个:
去打开apt的源:
sudo gedit /etc/apt/sources.list
发现了如下内容(found that):
…
# Mirrors.shlug.org更新服务器
#(电信服务器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group)
# ~20KB
deb http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
# Mirror.lupaworld.com更新服务器(浙江省杭州市双线服务器)
# !!! ~230KB/s
deb http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse
…
其中“ # Mirrors.shlug.org更新服务器”的部分,没有按照预料的那样被注释掉
(the # Mirrors.shlug.org更新服务器 part, is not comment out as expected, so it is duplicated with the orignal default ones):
…
deb http://cn.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ karmic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ karmic universe
deb http://cn.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ karmic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ karmic multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ karmic multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
…
所以,解决方法很简单,那就是:
注释(或直接删除)掉/etc/apt/sources.list中,内容有重复的那部分,就可以避免此错误了。
(so the solution is quite simple:
comment out or remove the duplicated source in your /etc/apt/sources.list
)
just :
sudo gedit /etc/apt/sources.list
then do like this :
# Mirrors.shlug.org更新服务器
#(电信服务器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group)
# ~20KB
#deb http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
转载请注明:在路上 » 【已解决(fixed)】W: Duplicate sources.list entry when do “sudo apt-get update”