在 2019年搶了一台 Ubuntu 18.04 後,一直在那邊做例行公事。應該近一年 apt upgrade 也沒法多升級什麼就涼在那邊,趁 2024-01-01 假期,來整理一下。
升級絕對有風險,請自行評估跟承擔,在此謹流水帳紀錄,適合我的 VM 情況不代表大家都能升。
由於之前有設定防火牆來做一些簡單的防護,這次升級時要打開 1022 port 來小心一下:
$ sudo iptables -I INPUT 1 -p tcp --dport 1022 -j ACCEPT$ sudo service netfilter-persistent save
開始操作:
$ sudo do-release-upgrade...Calculating the changesCould not calculate the upgradeAn unresolvable problem occurred while calculating the upgrade.This was likely caused by:* Unofficial software packages not provided by UbuntuPlease use the tool 'ppa-purge' from the ppa-purgepackage to remove software from a Launchpad PPA andtry the upgrade again.If none of this applies, then please report this bug using thecommand 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. Ifyou want to investigate this yourself the log files in'/var/log/dist-upgrade' will contain details about the upgrade.Specifically, look at 'main.log' and 'apt.log'.
接著安裝一下:
$ sudo apt-get install ppa-purge$ sudo do-release-upgrade...
又碰到問題,大概看了一下 bugs.launchpad.net/ubuntu/+source/llvm-toolchain-9/+bug/1886748 ,偷懶衝:
$ sudo apt install clang-9$ sudo do-release-upgrade...Do you want to start the upgrade?17 packages are going to be removed. 209 new packages are going to beinstalled. 759 packages are going to be upgraded.You have to download a total of 886 M. This download will take about1 hour 52 minutes with a 1Mbit DSL connection and about 1 day 10hours with a 56k modem.Fetching and installing the upgrade can take several hours. Once thedownload has finished, the process cannot be canceled.Continue [yN] Details [d]Y...System upgrade is complete.Restart requiredTo finish the upgrade, a restart is required.If you select 'y' the system will be restarted.Continue [yN] Y
所幸...連得上 XD 看來完成了 Ubuntu 20.04 了
$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 20.04.6 LTSRelease: 20.04Codename: focal
繼續升上去!
$ sudo do-release-upgrade...Reading cacheChecking package managerContinue running under SSH?This session appears to be running under ssh. It is not recommendedto perform a upgrade over ssh currently because in case of failure itis harder to recover.If you continue, an additional ssh daemon will be started at port'1022'.Do you want to continue?Continue [yN] YStarting additional sshdTo make recovery in case of failure easier, an additional sshd willbe started on port '1022'. If anything goes wrong with the runningssh you can still connect to the additional one.To continue please press [ENTER]Do you want to start the upgrade?12 packages are going to be removed. 128 new packages are going to beinstalled. 826 packages are going to be upgraded.You have to download a total of 746 M. This download will take about2 minutes with your connection.Installing the upgrade can take several hours. Once the download hasfinished, the process cannot be canceled.Continue [yN] Details [d] YdoneProcessing triggers for dbus (1.12.20-2ubuntu4.1) ...Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.8+dfsg-1ubuntu0.2) ...Reading package lists... DoneBuilding dependency treeReading state information... DoneProcessing snap replacementsrefreshing snap lxdrefreshing snap oracle-cloud-agentSearching for obsolete softwareReading state information... DoneRemove obsolete packages?127 packages are going to be removed.Removing the packages can take several hours.Continue [yN] Details [d]Y...System upgrade is complete.Restart requiredTo finish the upgrade, a restart is required.If you select 'y' the system will be restarted.Continue [yN] Y
再次登入:
$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 22.04.3 LTSRelease: 22.04Codename: jammy
沒有留言:
張貼留言