Debian
如何刪除 Debian 8.7 上的重複源列表
在按照Digital Ocean上的教程安裝 #letsencrypt 後,我正在執行 Debian 8.7 。我無法再更新我的作業系統,如果我執行
sudo apt-get update
它,最後會顯示以下錯誤W: Duplicate sources.list entry ...ftp.debian.org/debian/ jessie-backports/main amd64 Packages (/var/lib/apt/lists/ftp.debian.org_debian_dists_jessie-backports_main_binary-amd64_Packages) W: You may want to run apt-get update to correct these problems</code>
為了查看我的源列表,我執行以下程式碼
cat /etc/apt/sources.list /etc/apt/sources.list.d/*
顯示以下結果
deb http://httpredir.debian.org/debian/ jessie main deb-src http://httpredir.debian.org/debian/ jessie main deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main deb http://httpredir.debian.org/debian/ jessie-updates main deb-src http://httpredir.debian.org/debian/ jessie-updates main deb http://http.debian.net/debian jessie main deb-src http://http.debian.net/debian jessie main deb http://ftp.debian.org/debian jessie-backports main deb http://httpredir.debian.org/debian/ jessie-backports main deb-src http://httpredir.debian.org/debian/ jessie-backports main deb http://packages.cloud.google.com/apt cloud-sdk-jessie main deb http://packages.cloud.google.com/apt google-cloud-compute-jessie main deb http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-jessie main deb http://packages.cloud.google.com/apt cloud-sdk-jessie main deb http://packages.cloud.google.com/apt google-cloud-compute-jessie main deb http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-jessie main deb http://ftp.debian.org/debian jessie-backports main deb http://ftp.debian.org/debian jessie-backports main
伙計們,我應該刪除哪個資源以及我應該如何使用什麼程式碼或過程來刪除它。我對這些整個事情了解不多,我只是按照網上找到的說明來做所有事情。
重複的源列表是
...ftp.debian.org/debian/ jessie-backports/main.
。您需要將其刪除。執行grep jessie-backports /etc/apt/sources.list.d/*
andgrep jessie-backports /etc/apt/sources.list
,查看哪些文件有它,用文本編輯器(例如 nano)打開它,刪除它,然後apt-get update
刷新 apt 的記憶體。
根據您所指的 DigitalOcean 文件,我的錢在:
rm -f /etc/apt/sources.list.d/backports.list apt-get update
如您所見,
jessie-backports
您的cat
輸出中有兩個,…