WSLのUbuntuを20.04から22.04にアップグレードする際のエラーを直す

Proxy関連のエラーだと言われるときの直し方。下記のエラーが出る。

user_name@computer_name:~$ 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.

Check your Internet connection or proxy settingsと言われているのでProxyの設定なのかなと思いきや、そうではなくhttpsが使えていないというのが結論とのこと。

user_name@computer_name:~$ cat /etc/update-manager/meta-release
# default location for the meta-release file

[METARELEASE]
URI = http://changelogs.ubuntu.com/meta-release
URI_LTS = http://changelogs.ubuntu.com/meta-release-lts
URI_UNSTABLE_POSTFIX = -development
URI_PROPOSED_POSTFIX = -proposed

上記のようにURIとかURI_LTSをhttpsからhttpに変える。そうすると下記のようにメッセージが変わる。

user_name@computer_name:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
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.

あとは-dオプションをつければアップグレードできる。

user_name@computer_name:~$ sudo do-release-upgrade -d

コメント