apt-get 更新在 debian freeze 上失败并显示“找不到文件”

apt-get 更新在 debian freeze 上失败并显示“找不到文件”

我正在尝试更新运行 Debian Squeeze 的旧服务器。 apt-get 更新失败。输出在这里:

Ign file: debs/ Release.gpg
Ign file:/root/ debs/ Translation-en                                                                 
Ign file:/root/ debs/ Translation-en_US                                                              
Ign file: debs/ Release                                                                              
Ign file: debs/ Sources                                                                              
Ign file: debs/ Packages                                                                             
Ign file: debs/ Sources                                                                              
Ign file: debs/ Packages                                                                             
Err file: debs/ Sources                                                                              
  File not found
Err file: debs/ Packages                                                                             
  File not found
Hit ftp://ftp.fi.debian.org squeeze-lts Release.gpg                                                  
Get:1 ftp://ftp.fi.debian.org/debian/ squeeze-lts/contrib Translation-en                             
Ign ftp://ftp.fi.debian.org/debian/ squeeze-lts/contrib Translation-en                               
Get:2 ftp://ftp.fi.debian.org/debian/ squeeze-lts/contrib Translation-en_US                          
Ign ftp://ftp.fi.debian.org/debian/ squeeze-lts/contrib Translation-en_US                            
Get:3 ftp://ftp.fi.debian.org/debian/ squeeze-lts/main Translation-en                                
Ign ftp://ftp.fi.debian.org/debian/ squeeze-lts/main Translation-en                                  
Get:4 ftp://ftp.fi.debian.org/debian/ squeeze-lts/main Translation-en_US                             
Ign ftp://ftp.fi.debian.org/debian/ squeeze-lts/main Translation-en_US                 
Get:5 ftp://ftp.fi.debian.org/debian/ squeeze-lts/non-free Translation-en              
Hit http://backports.debian.org squeeze-backports Release.gpg                       
Hit http://backports.debian.org/debian-backports/ squeeze-backports/main Translation-en
Ign http://backports.debian.org/debian-backports/ squeeze-backports/main Translation-en_US
Ign ftp://ftp.fi.debian.org/debian/ squeeze-lts/non-free Translation-en
Get:6 ftp://ftp.fi.debian.org/debian/ squeeze-lts/non-free Translation-en_US
Ign ftp://ftp.fi.debian.org/debian/ squeeze-lts/non-free Translation-en_US             
Hit ftp://ftp.fi.debian.org squeeze-lts Release                                        
Hit http://backports.debian.org squeeze-backports Release                           
Hit http://security.debian.org squeeze/updates Release.gpg                          
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en_US
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_US
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en_US
Hit ftp://ftp.fi.debian.org squeeze-lts/main Sources/DiffIndex
Hit http://security.debian.org squeeze/updates Release 
Hit ftp://ftp.fi.debian.org squeeze-lts/non-free Sources/DiffIndex
Hit ftp://ftp.fi.debian.org squeeze-lts/contrib Sources
Hit ftp://ftp.fi.debian.org squeeze-lts/main i386 Packages/DiffIndex
Hit http://backports.debian.org squeeze-backports/main i386 Packages
Hit ftp://ftp.fi.debian.org squeeze-lts/non-free i386 Packages/DiffIndex
Hit ftp://ftp.fi.debian.org squeeze-lts/contrib i386 Packages
Hit http://security.debian.org squeeze/updates/main i386 Packages
Hit http://security.debian.org squeeze/updates/contrib i386 Packages
Hit http://security.debian.org squeeze/updates/non-free i386 Packages
W: Failed to fetch file:/root/debs/Sources.gz  File not found

W: Failed to fetch file:/root/debs/Packages.gz  File not found

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

我的sources.list的内容在这里:

# local packages
deb file:/root debs/
deb-src file:/root debs/

# the basic archive
deb ftp://ftp.fi.debian.org/debian/ squeeze-lts main non-free contrib
deb-src ftp://ftp.fi.debian.org/debian/ squeeze-lts main non-free contrib


# the security patches
deb http://security.debian.org/ squeeze/updates main contrib non-free

deb http://backports.debian.org/debian-backports squeeze-backports main

到目前为止,我尝试的是将sources.list 中的前两个条目从squeeze 更改为squeeze-lts,因为squeeze 似乎不再存在于存储库中。

我知道 Squeeze 不再受到官方支持,我计划在不久的将来有时进行升级,但我想首先将当前安装设置为“干净”且最新的状态。

答案1

您的sources.list引用了两个file来源:

deb file:/root debs/
deb-src file:/root debs/

这些行期望目录下有本地 Debian 发行版/root/(带有子目录/root/debs/)。显然,那里的文件不再可用。

除非您在本地为自己的软件包维护一个特殊的存储库,否则您可以毫无问题地注释甚至删除这两行。不过,应该apt-get dist-upgrade可以工作。

相关内容