![執行 sudo apt-get update 時發生錯誤 —sources.list 中存在重複條目](https://rvso.com/image/1505654/%E5%9F%B7%E8%A1%8C%20sudo%20apt-get%20update%20%E6%99%82%E7%99%BC%E7%94%9F%E9%8C%AF%E8%AA%A4%20%E2%80%94sources.list%20%E4%B8%AD%E5%AD%98%E5%9C%A8%E9%87%8D%E8%A4%87%E6%A2%9D%E7%9B%AE.png)
我有一個錯誤已經發生很長一段時間了。每當我運行時sudo apt-get update
,我都會得到以下輸出:
Hit http://repo.ajenti.org main InRelease
Hit http://repo.ajenti.org main/main amd64 Packages
Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://repo.ajenti.org main/ubuntu amd64 Packages
Hit http://repo.ajenti.org main/main i386 Packages
Hit http://repo.ajenti.org main/ubuntu i386 Packages
Hit http://security.ubuntu.com trusty-security InRelease
Get:1 http://us.archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Ign http://packages.linuxmint.com rebecca InRelease
Ign http://extra.linuxmint.com rebecca InRelease
Get:2 http://security.ubuntu.com trusty-security/main Sources [119 kB]
Hit http://packages.linuxmint.com rebecca Release.gpg
Hit http://extra.linuxmint.com rebecca Release.gpg
Get:3 http://us.archive.ubuntu.com trusty Release.gpg [933 B]
Get:4 http://us.archive.ubuntu.com trusty-updates/main Sources [380 kB]
Get:5 http://security.ubuntu.com trusty-security/restricted Sources [4,064 B]
Hit http://packages.linuxmint.com rebecca Release
Hit http://extra.linuxmint.com rebecca Release
Ign http://archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Get:6 http://us.archive.ubuntu.com trusty-updates/restricted Sources [5,360 B]
Ign http://archive.canonical.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Get:7 http://us.archive.ubuntu.com trusty-updates/main amd64 Packages [889 kB]
Hit http://packages.linuxmint.com rebecca/main amd64 Packages
Hit http://extra.linuxmint.com rebecca/main amd64 Packages
Hit http://archive.ubuntu.com trusty-updates InRelease
Hit http://archive.canonical.com trusty Release.gpg
Get:8 http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.9 kB]
Hit http://packages.linuxmint.com rebecca/upstream amd64 Packages
Hit http://extra.linuxmint.com rebecca/main i386 Packages
Get:9 http://us.archive.ubuntu.com trusty-updates/main i386 Packages [851 kB]
Hit http://archive.ubuntu.com trusty Release.gpg
Hit http://archive.canonical.com trusty Release
Hit http://packages.linuxmint.com rebecca/import amd64 Packages
Get:10 http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB]
Hit http://archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://packages.linuxmint.com rebecca/main i386 Packages
Get:11 http://us.archive.ubuntu.com trusty-updates/main Translation-en [430 kB]
Hit http://archive.canonical.com trusty/partner amd64 Packages
Hit http://packages.linuxmint.com rebecca/upstream i386 Packages
Get:12 http://us.archive.ubuntu.com trusty-updates/restricted Translation-en [3,699 B]
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/restricted amd64 Packages
Get:13 http://us.archive.ubuntu.com trusty Release [58.5 kB]
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Get:14 http://us.archive.ubuntu.com trusty/main Sources [1,064 kB]
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Hit http://packages.linuxmint.com rebecca/import i386 Packages
Hit http://archive.canonical.com trusty/partner i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://extra.linuxmint.com rebecca/main Translation-en_US
Get:15 http://us.archive.ubuntu.com trusty/restricted Sources [5,433 B]
Hit http://archive.canonical.com trusty/partner Translation-en
Hit http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Get:16 http://us.archive.ubuntu.com trusty/main amd64 Packages [1,350 kB]
Ign http://extra.linuxmint.com rebecca/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/main i386 Packages
Get:17 http://us.archive.ubuntu.com trusty/restricted amd64 Packages [13.0 kB]
Get:18 http://us.archive.ubuntu.com trusty/main i386 Packages [1,348 kB]
Hit http://archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://archive.ubuntu.com trusty-updates/universe i386 Packages
Get:19 http://us.archive.ubuntu.com trusty/restricted i386 Packages [13.4 kB]
Hit http://archive.ubuntu.com trusty-updates/multiverse i386 Packages
Get:20 http://us.archive.ubuntu.com trusty/main Translation-en [762 kB]
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Get:21 http://us.archive.ubuntu.com trusty/restricted Translation-en [3,457 B]
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://archive.ubuntu.com trusty Release
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Ign http://packages.linuxmint.com rebecca/import Translation-en_US
Ign http://packages.linuxmint.com rebecca/import Translation-en
Ign http://packages.linuxmint.com rebecca/main Translation-en_US
Ign http://packages.linuxmint.com rebecca/main Translation-en
Ign http://packages.linuxmint.com rebecca/upstream Translation-en_US
Ign http://packages.linuxmint.com rebecca/upstream Translation-en
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty/main i386 Packages
Hit http://archive.ubuntu.com trusty/restricted i386 Packages
Hit http://archive.ubuntu.com trusty/universe i386 Packages
Hit http://archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Ign http://repo.ajenti.org main/main Translation-en_US
Ign http://repo.ajenti.org main/main Translation-en
Ign http://repo.ajenti.org main/ubuntu Translation-en_US
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://repo.ajenti.org main/ubuntu Translation-en
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Fetched 7,399 kB in 4s (1,505 kB/s)
Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_main_binary-amd64_Packages)
Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-amd64_Packages)
Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/main i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_main_binary-i386_Packages)
Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/restricted i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-i386_Packages)
You may want to run apt-get update to correct these problems
Reading package lists... Done
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_main_binary-amd64_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-amd64_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/main i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_main_binary-i386_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ trusty-security/restricted i386 Packages (/var/lib/apt/lists/security.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 中有重複的條目。但是當我這樣做時cat /etc/apt/sources.list
,我得到以下輸出:
# See sources.list(5) manpage for more information
# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool.
deb http://us.archive.ubuntu.com/ubuntu trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu trusty main restricted
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://us.archive.ubuntu.com/ubuntu trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu trusty-updates main restricted
有誰知道為什麼會發生這種情況以及我能做些什麼來解決它?以下是來自 的更多資訊lsb_release -a
:
Distributor ID: LinuxMint
Description: Linux Mint 17.1 Rebecca
Release: 17.1
Codename: rebecca