从 16.04 迟来的升级到 18.04

xen*_*oid 5 upgrade 16.04

我有一个运行 Ubuntu Server 16.04 的 Digital Ocean Droplet。我尝试运行 a do-release-upgrade(在强制apt update和之后apt upgrade),但它很快就停止了:

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease                                                                                                          
Hit http://mirrors.digitalocean.com/ubuntu xenial InRelease                                                                                                                   
Get:1 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security InRelease [7476 B]                                                                                            
Get:2 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates InRelease [7475 B]                                                                                             
Get:3 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease [109 kB]                                                                                                
Get:4 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease [107 kB]                                                                                              
Get:5 http://mirrors.digitalocean.com/ubuntu xenial-security InRelease [109 kB]                                                                                               
Get:6 http://mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 Packages [2048 kB]                                                                                     
Get:7 http://mirrors.digitalocean.com/ubuntu xenial-updates/main i386 Packages [1524 kB]                                                                                      
Get:8 http://mirrors.digitalocean.com/ubuntu xenial-updates/universe amd64 Packages [1220 kB]                                                                                 
Get:9 http://mirrors.digitalocean.com/ubuntu xenial-updates/universe i386 Packages [1086 kB]                                                                                  
Fetched 6218 kB in 0s (0 B/s)                                                                                                                                                 
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
No snaps are installed yet. Try 'snap install hello-world'.

Checking for installed snaps

Calculating snap size requirements

Updating repository information

Third party sources disabled 

Some third party entries in your sources.list were disabled. You can 
re-enable them after the upgrade with the 'software-properties' tool 
or your package manager. 

To continue please press [ENTER]

Get:1 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security InRelease [7458 B]                                                                                            
Get:2 https://esm.ubuntu.com/infra/ubuntu bionic-infra-updates InRelease [7457 B]                                                                                             
Fetched 14.9 kB in 0s (0 B/s)                                                                                                                                                 

Checking package manager
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Invalid package information 

After updating your package information, the essential package 
'ubuntu-minimal' could not be located. This may be because you have 
no official mirrors listed in your software sources, or because of 
excessive load on the mirror you are using. See /etc/apt/sources.list 
for the current list of configured software sources. 
In the case of an overloaded mirror, you may want to try the upgrade 
again later. 
Run Code Online (Sandbox Code Playgroud)

这是因为软件源不再正确(如果是的话,正确的是什么)?官方的 DO 口号是在另一个 Droplet 上安装新版本,然后切换 Droplet,但我想避免这种情况。

编辑:DO 的标准/etc/apt/source.lst仅指向 DO 的镜子。看看它(在do-release-upgrade由于失败而恢复之前),似乎所有条目都被注释掉了(被视为第 3 方来源?)。那么我在哪里可以找到指向 Canonical 存储库的 resources.lst 呢?

无需经过 18.04 步骤即可移动到 20.04 的方法的奖励积分...

PS:do-release-upgrade在我的另一个运行 18.04 的 Droplet 上运行完美。

Jos*_*ack 6

看来您正在使用 Digital Ocean。制作快照,然后您可以尝试将 source.list 替换为存档版本,如下所示

sudo sed -i 's/mirrors.digitalocean.com/us.archive.ubuntu.com/' /etc/apt/sources.list

然后再次尝试运行do-release-upgrade

如果遇到困难,我之前也必须运行这个do-release-upgrade

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

完成后,恢复文件。

sudo sed -i 's/us.archive.ubuntu.com/mirrors.digitalocean.com/' /etc/apt/sources.list