do-release upgrade 時の proxy 設定

メジャーバージョンアップ

Ubuntu のメジャーバージョンアップをコマンドラインでするには
# sudo apt update
# sudo apt grade
# sudo do-release-upgrade
をします。なお /etc/update-manager/release-upgrades に
Prompt=lts
とあれば最新の LTS へアップグレードし、
Prompt=normal
とあれば LTS でなくとも最新バージョンへアップグレードします。

proxy問題

素直にアップグレードできればいいのですが、 proxy 環境下では以下のエラーが出ることがあるようです。
# sudo do-release-upgrade

Connection to Snap Store failed

Your system does not have a connection to the Snap Store. For the best upgrade experience make sure that your system can connect to api.snapcraft.io. Do you still want to continue with the upgrade?

Continue [yN]
どうやら proxy の設定が snap とやらに伝わっていないのが原因のようです。 snap に proxy の設定を教えてあげます。
# sudo snap set system proxy.http="http://(proxy_address):(proxy_port)"
# sudo snap set system proxy.https="http://(proxy_address):(proxy_port)"
この後にアップグレードします。
# sudo do-release-upgrade

Last modified: Tue Jan 24 19:07:40 JST 2012