无法从 Ubuntu 20.04.6 LTS 升级到 Ubuntu 22.04.3 LTS

无法从 Ubuntu 20.04.6 LTS 升级到 Ubuntu 22.04.3 LTS

我执行命令:

sudo do-release-upgrade

我得到了这个输出:

Checking for a new Ubuntu release
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release 
set Prompt=normal in /etc/update-manager/release-upgrades.

我可以正确地curl https://changelogs.ubuntu.com/meta-release-lts

这是更新命令:

sudo apt update
 
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease                                                                                                                                                  
Hit:3 https://download.docker.com/linux/ubuntu focal InRelease                                                                                                                                                   
Hit:4 https://deb.opera.com/opera-stable stable InRelease                                                                                                                                                        
Get:5 https://dl.yarnpkg.com/debian stable InRelease [17,1 kB]                                                                                                                                                   
Hit:6 https://deb.termius.com squeeze InRelease                                                                                                                                                                  
Hit:7 https://apt.releases.hashicorp.com focal InRelease                                                                                                                                                         
Hit:8 https://baltocdn.com/helm/stable/debian all InRelease                                                                                                                                                      
Hit:9 https://packages.cloud.google.com/apt cloud-sdk InRelease                                                                                                                                         
Hit:10 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease                                                                                                           
Get:12 https://packages.microsoft.com/repos/ms-teams stable InRelease [5.931 B]                                                                             
Hit:13 http://archive.ubuntu.com/ubuntu focal InRelease                                                                                                                   
Hit:11 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.28/deb  InRelease                              
Get:14 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                        
Hit:15 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 InRelease        
Get:16 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [274 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [414 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:21 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [8.000 B]
Get:22 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30,5 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59,8 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [96,3 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [940 B]
Fetched 1.244 kB in 4s (320 kB/s)      
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

与基础文件相关的信息:

apt-cache policy base-files
base-files:
  Installed: 11ubuntu5.7
  Candidate: 11ubuntu5.7
  Version table:
 *** 11ubuntu5.7 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     11ubuntu5 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

设置 prompt=normal 我得到这个结果:

sudo do-release-upgrade -c

Checking for a new Ubuntu release
Failed to connect to https://changelogs.ubuntu.com/meta-release. 
Check your Internet connection or proxy settings
No new release found.

我解决了这个问题,添加:

export SSL_CERT_DIR=/etc/ssl/certs

到 ~/.bashrc

并添加:

Defaults        env_keep += "SSL_CERT_DIR"

和:

sudo visudo

相关内容