无法将 Ubuntu 版本 15.10 升级到 16.04

无法将 Ubuntu 版本 15.10 升级到 16.04

首先,我尝试在 ubuntu 15.10 中将 php 版本 7.0 升级到 7.1,并且我提出了问题,但社区关闭了我的问题并要求我升级 ubunuu 版本,所以我问了这个新问题。

我认为这不是重复的问题,因为我尝试了所有的在线解决方案但没有任何效果,所以请检查我的输出。

我使用的是 Ubuntu 版本15.10

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily

这是我的/etc/apt/sources.list

# deb cdrom:[Ubuntu 15.04 _Vivid Vervet_ - Release amd64 (20150422)]/ vivid main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
# deb http://old-releases.ubuntu.com/ubuntu/ vivid main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
# deb http://old-releases.ubuntu.com/ubuntu/ vivid-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb http://old-releases.ubuntu.com/ubuntu/ vivid universe
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid universe
# deb http://old-releases.ubuntu.com/ubuntu/ vivid-updates universe
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb http://old-releases.ubuntu.com/ubuntu/ vivid multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid multiverse
# deb http://old-releases.ubuntu.com/ubuntu/ vivid-updates multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://old-releases.ubuntu.com/ubuntu vivid-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu vivid-backports main restricted universe multiverse

# deb http://old-releases.ubuntu.com/ubuntu vivid-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu vivid-security main restricted
# deb http://old-releases.ubuntu.com/ubuntu vivid-security universe
deb-src http://old-releases.ubuntu.com/ubuntu vivid-security universe
# deb http://old-releases.ubuntu.com/ubuntu vivid-security multiverse
deb-src http://old-releases.ubuntu.com/ubuntu vivid-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu vivid partner
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid partner
deb http://old-releases.ubuntu.com/ubuntu/ xenial main
deb http://old-releases.ubuntu.com/ubuntu/ vivid main # auto generated by ubuntu-release-upgrader
deb http://old-releases.ubuntu.com/ubuntu/ stable main # auto generated by ubuntu-release-upgrader

每当我尝试更新时,它都会给出以下输出,

sudo apt-get update
Ign http://dl.google.com stable InRelease
Hit http://ppa.launchpad.net wily InRelease                                    
Hit http://dl.google.com stable Release.gpg                                                                             
Hit http://old-releases.ubuntu.com vivid InRelease                                                                      
Hit http://old-releases.ubuntu.com vivid-updates InRelease                                         
Hit http://dl.google.com stable Release                              
Hit http://ppa.launchpad.net wily InRelease                          
Hit http://old-releases.ubuntu.com vivid-backports InRelease                                       
Hit http://old-releases.ubuntu.com vivid-security InRelease                                                              
Hit http://ppa.launchpad.net wily/main amd64 Packages                                         
Ign http://old-releases.ubuntu.com xenial InRelease                                             
Ign http://old-releases.ubuntu.com stable InRelease                                             
Hit http://ppa.launchpad.net wily/main i386 Packages                      
Hit http://dl.google.com stable/main amd64 Packages
Hit http://ppa.launchpad.net wily/main Translation-en                                                          
Ign http://dl.google.com stable/main Translation-en_IN                                                               
Ign http://dl.google.com stable/main Translation-en                       
Hit http://ppa.launchpad.net wily/main amd64 Packages                     
Hit http://old-releases.ubuntu.com vivid-backports/restricted Sources
Hit http://ppa.launchpad.net wily/main i386 Packages                                      
Hit http://old-releases.ubuntu.com vivid-backports/multiverse Sources                     
Hit http://ppa.launchpad.net wily/main Translation-en                      
Ign http://old-releases.ubuntu.com xenial Release.gpg
Ign http://old-releases.ubuntu.com stable Release.gpg
Hit http://old-releases.ubuntu.com vivid/main Sources
Hit http://old-releases.ubuntu.com vivid/restricted Sources
Hit http://old-releases.ubuntu.com vivid/universe Sources
Hit http://old-releases.ubuntu.com vivid/multiverse Sources
Hit http://old-releases.ubuntu.com vivid-updates/main Sources
Hit http://old-releases.ubuntu.com vivid-updates/restricted Sources
Hit http://old-releases.ubuntu.com vivid-updates/universe Sources                                                                             
Hit http://old-releases.ubuntu.com vivid-updates/multiverse Sources                                                                           
Hit http://old-releases.ubuntu.com vivid-backports/main Sources                                                                               
Hit http://old-releases.ubuntu.com vivid-backports/universe Sources                                                                           
Hit http://old-releases.ubuntu.com vivid-security/main Sources                                                                                
Hit http://old-releases.ubuntu.com vivid-security/restricted Sources                                                                          
Hit http://old-releases.ubuntu.com vivid-security/universe Sources                                                                            
Hit http://old-releases.ubuntu.com vivid-security/multiverse Sources                                                                          
Ign http://old-releases.ubuntu.com xenial Release                                                                                             
Ign http://old-releases.ubuntu.com stable Release                                                                                             
Err http://old-releases.ubuntu.com xenial/main amd64 Packages                                                                                 
  404  Not Found [IP: 91.189.88.41 80]
Err http://old-releases.ubuntu.com xenial/main i386 Packages                                                                                  
  404  Not Found [IP: 91.189.88.41 80]
Ign http://old-releases.ubuntu.com xenial/main Translation-en_IN                                                                              
Ign http://old-releases.ubuntu.com xenial/main Translation-en                                                                                 
Err http://old-releases.ubuntu.com stable/main amd64 Packages                                                                                 
  404  Not Found [IP: 91.189.88.41 80]
Err http://old-releases.ubuntu.com stable/main i386 Packages                                                                                  
  404  Not Found [IP: 91.189.88.41 80]
Ign http://old-releases.ubuntu.com stable/main Translation-en_IN                                                                              
Ign http://old-releases.ubuntu.com stable/main Translation-en                                                                                 
W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/vivid/InRelease  Unable to find expected entry 'partner/source/Sources' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.41 80]

W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.41 80]

W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/stable/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.41 80]

W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/stable/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.41 80]

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

我按照所有链接更改了/etc/apt/sources.listhttp://old-releases.ubuntu.com/ubuntu但没有什么能archive.ubuntu.com/ubuntu帮助我

答案1

此处的存储库信息看起来格式不正确。它包含 Vivid (15.04)、Wily (15.10) 和 xenial (16.04) 的存储库信息。由于您使用的是 Wily Werewolf (15.10),因此您需要恢复 Wily 的默认存储库信息。此外,Wily 现已停产,因此可以使用旧版本而不是典型存档。要恢复 Wily(旧版本)的默认存储库信息,请使用以下两种方法之一:

  • 删除旧的 sources.list

    sudo rm /etc/apt/sources.list
    

    重新创建 sources.list。我已粘贴存储库信息(旧版本)这里为方便起见。使用以下命令从那里复制并粘贴存储库信息

    sudo nano /etc/apt/sources.list
    

    保存并退出。

或者

  • 打开软件和更新应用程序,选择组件并单击保存/重新加载。您可能会得到failed to fetch repository information,这很明显。单击好的然后运行

    sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
    

现在,在升级系统之前,请确保所有软件包都是最新的。为此,

sudo apt update && sudo apt upgrade

此外,在将系统升级到较新的版本之前,请考虑禁用所有第三方 PPA 并删除从中安装的所有软件包。

相关内容