Debian

“sudo apt update”下載包失敗

  • April 6, 2021

嘗試sudo apt update在我的伺服器上執行時出現以下錯誤:

<... Removed for clarity ...>

Ign https://deb.nodesource.com jessie/main Translation-en                                                                                         
Get:37 http://deb.freexian.com wheezy-lts-kernel/main amd64 Packages [11.8 kB]                                                                    
Err http://debian.uberglobalmirror.com stretch InRelease                                                                                          
 
Get:38 http://nsolid-deb.nodesource.com jessie/main amd64 Packages [1467 B]                                       
Get:39 http://repo.mongodb.org jessie/mongodb-org/4.0/main amd64 Packages [16.0 kB]                                                      
Ign http://deb.freexian.com wheezy-lts/contrib Translation-en                                                                            
Ign http://deb.freexian.com wheezy-lts/main Translation-en                                                        
Ign http://deb.freexian.com wheezy-lts/non-free Translation-en                              
Ign http://deb.freexian.com wheezy-lts-kernel/main Translation-en                           
Err http://debian.uberglobalmirror.com stretch-updates InRelease                            
 
Ign http://repo.mongodb.org jessie/mongodb-org/4.0/main Translation-en                      
Ign http://nsolid-deb.nodesource.com jessie/main Translation-en       
Err http://debian.uberglobalmirror.com stretch Release.gpg            
 Temporary failure resolving 'debian.uberglobalmirror.com'
Err http://debian.uberglobalmirror.com stretch-updates Release.gpg
 Temporary failure resolving 'debian.uberglobalmirror.com'
Fetched 20.4 kB in 2s (8219 B/s)                
Reading package lists... Done
W: There is no public key available for the following key IDs:
112695A0E562B32A
W: Failed to fetch http://debian.uberglobalmirror.com/debian/dists/stretch/InRelease  

W: Failed to fetch http://debian.uberglobalmirror.com/debian/dists/stretch-updates/InRelease  

W: Failed to fetch http://debian.froxlor.org/dists/jessie/main/source/Sources  HttpError404

W: Failed to fetch http://debian.froxlor.org/dists/jessie/main/binary-amd64/Packages  HttpError404

W: Failed to fetch http://debian.uberglobalmirror.com/debian/dists/stretch/Release.gpg  Temporary failure resolving 'debian.uberglobalmirror.com'

W: Failed to fetch http://debian.uberglobalmirror.com/debian/dists/stretch-updates/Release.gpg  Temporary failure resolving 'debian.uberglobalmirror.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

Debian 版本:

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.11 (jessie)
Release:        8.11
Codename:       jessie

到目前為止我已經嘗試過:

  • 進入unset http_proxyunset https_proxy在控制台中
  • 更改/etc/apt/sources.list為以下內容:
deb http://debian.uberglobalmirror.com/debian/ stretch main
deb-src http://debian.uberglobalmirror.com/debian/ stretch main

deb http://security.debian.org/ stretch/updates main contrib
deb-src http://security.debian.org/ stretch/updates main contrib

# stretch-updates, previously known as 'volatile'
deb http://debian.uberglobalmirror.com/debian/ stretch-updates main contrib
deb-src http://debian.uberglobalmirror.com/debian/ stretch-updates main contrib
sudo cp /etc/apt/sources.list ~/ 
sudo wget "http://pastebin.com/raw.php?i=uzhrtg5M" -O /etc/apt/sources.list 
sudo apt-get update
sudo rm /etc/apt/sources.list.d/ubuntu-extras.list
sudo apt-get update
  • sudo apt-get upgrade``sudo apt-get upgrade -f這裡開始。
  • apt-get clean

我已經閱讀了很多文章,但沒有一個提到的解決方案對我有用。任何幫助,將不勝感激

這裡有很多問題。

  • Jessie 自 2020 年 6 月以來一直不受支持,因此您需要刪除對它的所有引用,因為它不會再出現在包儲存庫中
  • Stretch 可用,但僅在 LTS 中可用,直到 2022 年 6 月
  • 巴斯特是目前的“穩定”
  • 你得到Temporary failure resolving 'debian.uberglobalmirror.com'. 它不再是儲存庫伺服器,所以我建議你用推薦的條目替換它,實際上你的整個sources.list集合,如果你必須替換,buster``stretch
 deb http://deb.debian.org/debian buster main contrib non-free
 deb-src http://deb.debian.org/debian buster main contrib non-free

 deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
 deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free

 deb http://deb.debian.org/debian buster-updates main contrib non-free
 deb-src http://deb.debian.org/debian buster-updates main contrib non-free
  • 您可能需要安裝更新的包簽名密鑰
  • 您最好重新安裝“buster”;嘗試從不再存在於儲存庫中的發布版本進行升級並不有趣(去過那裡……)

引用自:https://unix.stackexchange.com/questions/643793