我无法安装 aptitude 并添加可信赖的 repos

我无法安装 aptitude 并添加可信赖的 repos

尝试运行sudo apt-get install aptitude

Package aptitude is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'aptitude' has no installation candidate

我尝试将可信存储库添加到我的源文件中...但我认为我的 apt 源文件有问题。能否帮助我解决为什么sudo apt-get update失败:

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/trusty-updates/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.150 80]

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/trusty-updates/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/trusty-security/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.150 80]

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/trusty-security/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.150 80]

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]

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

我目前正在运行:

Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty

这是我的源文件:

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
# deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse

###### Ubuntu Update Repos
# deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse 
# deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse 
# deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner

###### Ubuntu Extras Repo
# deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main

对此进行谷歌搜索没有成功,因为添加到源文件的存储库的许多选项也导致了同样的问题。

答案1

根据 Tadaen Sylvermane 的评论,我意识到最初列出的源文件存在某种损坏。我决定用我的发行版的默认源文件替换它。我去了:https://repogen.simplylinux.ch/index.php,选择了适合我所在的国家和发行版的默认存储库,生成了一个新的源文件,用新生成的文件替换了我的旧文件,然后执行了 apt 更新。

如图所示,一些 URL 仍然缺失:

ejspeiro@Eduardo-Alienware-14:/etc/apt$ sudo apt-get update
Ign file:  InRelease
Get:1 file:  Release.gpg [819 B]
Get:2 file:  Release [574 B]                                                   
Ign file:  Translation-en_US                                                   
Ign file:  Translation-en                                                      
Hit http://ppa.launchpad.net trusty InRelease                                  
Ign http://us.archive.ubuntu.com trusty InRelease 
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:3 http://us.archive.ubuntu.com trusty-security InRelease [65.9 kB]
Hit http://ppa.launchpad.net trusty/main armhf Packages    
Hit http://ppa.launchpad.net trusty/main i386 Packages                        
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Get:4 http://us.archive.ubuntu.com trusty-updates InRelease [65.9 kB]          
Get:5 http://us.archive.ubuntu.com trusty-proposed InRelease [65.9 kB]         
Hit http://us.archive.ubuntu.com trusty-backports InRelease                    
Hit http://us.archive.ubuntu.com trusty Release.gpg                            
Get:6 http://us.archive.ubuntu.com trusty-security/main amd64 Packages [588 kB]
Hit http://us.archive.ubuntu.com trusty-security/restricted amd64 Packages     
Hit http://us.archive.ubuntu.com trusty-security/universe amd64 Packages       
Hit http://us.archive.ubuntu.com trusty-security/multiverse amd64 Packages     
Hit http://us.archive.ubuntu.com trusty-security/main i386 Packages            
Hit http://us.archive.ubuntu.com trusty-security/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-security/universe i386 Packages        
Hit http://us.archive.ubuntu.com trusty-security/multiverse i386 Packages      
Hit http://us.archive.ubuntu.com trusty-security/main Translation-en           
Hit http://us.archive.ubuntu.com trusty-security/multiverse Translation-en     
Hit http://us.archive.ubuntu.com trusty-security/restricted Translation-en     
Hit http://us.archive.ubuntu.com trusty-security/universe Translation-en       
Hit http://us.archive.ubuntu.com trusty-updates/main amd64 Packages            
Hit http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages      
Hit http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages        
Hit http://us.archive.ubuntu.com trusty-updates/multiverse amd64 Packages      
Hit http://us.archive.ubuntu.com trusty-updates/main i386 Packages             
Hit http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/universe i386 Packages         
Hit http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages       
Hit http://us.archive.ubuntu.com trusty-updates/main Translation-en            
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en      
Hit http://us.archive.ubuntu.com trusty-updates/restricted Translation-en      
Hit http://us.archive.ubuntu.com trusty-updates/universe Translation-en        
Hit http://us.archive.ubuntu.com trusty-proposed/main amd64 Packages           
Hit http://us.archive.ubuntu.com trusty-proposed/restricted amd64 Packages     
Hit http://us.archive.ubuntu.com trusty-proposed/universe amd64 Packages       
Hit http://us.archive.ubuntu.com trusty-proposed/multiverse amd64 Packages     
Hit http://us.archive.ubuntu.com trusty-proposed/main i386 Packages            
Hit http://us.archive.ubuntu.com trusty-proposed/restricted i386 Packages      
Hit http://us.archive.ubuntu.com trusty-proposed/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-proposed/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-proposed/main Translation-en           
Hit http://us.archive.ubuntu.com trusty-proposed/multiverse Translation-en     
Hit http://us.archive.ubuntu.com trusty-proposed/restricted Translation-en     
Hit http://us.archive.ubuntu.com trusty-proposed/universe Translation-en       
Hit http://us.archive.ubuntu.com trusty-backports/main amd64 Packages          
Hit http://us.archive.ubuntu.com trusty-backports/restricted amd64 Packages    
Hit http://us.archive.ubuntu.com trusty-backports/universe amd64 Packages      
Hit http://us.archive.ubuntu.com trusty-backports/multiverse amd64 Packages    
Hit http://us.archive.ubuntu.com trusty-backports/main i386 Packages           
Hit http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe i386 Packages       
Hit http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages     
Hit http://us.archive.ubuntu.com trusty-backports/main Translation-en          
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en    
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en    
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en      
Hit http://us.archive.ubuntu.com trusty Release                                
Hit http://us.archive.ubuntu.com trusty/main Sources                           
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources                       
Hit http://us.archive.ubuntu.com trusty/multiverse Sources                     
Hit http://us.archive.ubuntu.com trusty/main amd64 Packages                    
Hit http://us.archive.ubuntu.com trusty/restricted amd64 Packages              
Hit http://us.archive.ubuntu.com trusty/universe amd64 Packages                
Hit http://us.archive.ubuntu.com trusty/multiverse amd64 Packages              
Hit http://us.archive.ubuntu.com trusty/main i386 Packages                     
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages                 
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages               
Hit http://us.archive.ubuntu.com trusty/main Translation-en                    
Hit http://us.archive.ubuntu.com trusty/multiverse Translation-en              
Hit http://us.archive.ubuntu.com trusty/restricted Translation-en              
Hit http://us.archive.ubuntu.com trusty/universe Translation-en                
Err http://us.archive.ubuntu.com trusty-security/main armhf Packages           
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-security/restricted armhf Packages     
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-security/universe armhf Packages       
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-security/multiverse armhf Packages     
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-updates/main armhf Packages            
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-updates/restricted armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-updates/universe armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-updates/multiverse armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-proposed/main armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-proposed/restricted armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty-proposed/universe armhf Packages
  404  Not Found [IP: 91.189.91.26 80]
Err http://us.archive.ubuntu.com trusty-proposed/multiverse armhf Packages
  404  Not Found [IP: 91.189.91.26 80]
Err http://us.archive.ubuntu.com trusty-backports/main armhf Packages
  404  Not Found [IP: 91.189.91.26 80]
Err http://us.archive.ubuntu.com trusty-backports/restricted armhf Packages
  404  Not Found [IP: 91.189.91.26 80]
Err http://us.archive.ubuntu.com trusty-backports/universe armhf Packages
  404  Not Found [IP: 91.189.91.26 80]
Err http://us.archive.ubuntu.com trusty-backports/multiverse armhf Packages
  404  Not Found [IP: 91.189.91.26 80]
Err http://us.archive.ubuntu.com trusty/main armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty/restricted armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty/universe armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com trusty/multiverse armhf Packages
  404  Not Found [IP: 91.189.91.23 80]
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 785 kB in 5min 41s (2,302 B/s)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-security/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-security/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-proposed/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-proposed/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-proposed/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.91.26 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-proposed/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.91.26 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.26 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.91.26 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.91.26 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.91.26 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.91.23 80]

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

但是,当执行 aptitude 安装时,一切都很顺利。此外,更新系统现在开始提示我进行一些更新。

至于为什么https://repogen.simplylinux.ch/index.php生成带有过时 URL 的源文件让我感到困惑。此外,我不明白为什么,如果这是一个应该支持到 2019 年的 LTS,那么为什么找不到存储库?

无论如何,我对这个过程及其结果感到满意,这就是我决定将其作为我原始问题的答案发布的原因。

相关内容