Ubuntu 16.04 升级到 18.04 的步骤

发布于 2023-02-01 22:45:21 字数 11812 浏览 120 评论 0

1、更新系统

sudo apt update
0% [Working]            Hit:1 https://download.docker.com/linux/ubuntu xenial InRelease
0% [Connecting to apt.armbian.com (185.158.177.155)]0% [1 InRelease gpgv 65.8 kB] [Connecting to apt.armbian.com (185.158.177.155)]                                                                               0% [Waiting for headers]                        Hit:2 http://apt.armbian.com xenial InRelease
                        0% [Working]0% [2 InRelease gpgv 19.3 kB]                             0% [Working]0% [Working]0% [Working]0% [Working]0% [Working]0% [Working]0% [Working]0% [Working]0% [Waiting for headers]                        Hit:3 http://ports.ubuntu.com xenial InRelease
                        0% [Working]0% [3 InRelease gpgv 247 kB] [Waiting for headers]                                                  Hit:4 http://ports.ubuntu.com xenial-security InRelease
                                                  0% [3 InRelease gpgv 247 kB]                            0% [Waiting for headers]0% [4 InRelease gpgv 107 kB] [Waiting for headers]                                                  Hit:5 http://ports.ubuntu.com xenial-updates InRelease
                                                  0% [4 InRelease gpgv 107 kB]                            0% [Waiting for headers]0% [5 InRelease gpgv 109 kB] [Waiting for headers]                                                  Hit:6 http://ports.ubuntu.com xenial-backports InRelease
                                                  0% [5 InRelease gpgv 109 kB]                            0% [Working]0% [6 InRelease gpgv 107 kB]                            20% [Working]             Reading package lists... 0%Reading package lists... 0%Reading package lists... 1%Reading package lists... 4%Reading package lists... 4%Reading package lists... 8%Reading package lists... 8%Reading package lists... 10%Reading package lists... 10%Reading package lists... 10%Reading package lists... 10%Reading package lists... 10%Reading package lists... 10%Reading package lists... 11%Reading package lists... 18%Reading package lists... 26%Reading package lists... 33%Reading package lists... 35%Reading package lists... 35%Reading package lists... 41%Reading package lists... 51%Reading package lists... 59%Reading package lists... 59%Reading package lists... 62%Reading package lists... 74%Reading package lists... 74%Reading package lists... 74%Reading package lists... 74%Reading package lists... 74%Reading package lists... 74%Reading package lists... 75%Reading package lists... 75%Reading package lists... 76%Reading package lists... 76%Reading package lists... 76%Reading package lists... 78%Reading package lists... 78%Reading package lists... 80%Reading package lists... 80%Reading package lists... 80%Reading package lists... 80%Reading package lists... 80%Reading package lists... 80%Reading package lists... 81%Reading package lists... 81%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 83%Reading package lists... 84%Reading package lists... 86%Reading package lists... 86%Reading package lists... 89%Reading package lists... 89%Reading package lists... 91%Reading package lists... 91%Reading package lists... 91%Reading package lists... 91%Reading package lists... 91%Reading package lists... 91%Reading package lists... 94%Reading package lists... 94%Reading package lists... 96%Reading package lists... 96%Reading package lists... 97%Reading package lists... 97%Reading package lists... 97%Reading package lists... 97%Reading package lists... 97%Reading package lists... 97%Reading package lists... 97%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 98%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 1%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree... 67%
Building dependency tree... 91%
Building dependency tree Reading state information... 0%
Reading state information... 0%
Reading state information... Done 42 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo apt upgrade -y
sudo apt dist-upgrade -y
Reading package lists... 0%
Reading package lists... 100%
Reading package lists... Done Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree... 66%
Building dependency tree... 90%
Building dependency tree Reading state information... 0%
Reading state information... 0%
Reading state information... Done Calculating upgrade... 0%
Calculating upgrade... 10%
Calculating upgrade... Done The following package was automatically installed and is no longer required: libllvm5.0 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

2、删除无用的依赖

sudo apt-get autoremove -y
Reading package lists... 0%
Reading package lists... 100%
Reading package lists... Done Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree... 66%
Building dependency tree... 89%
Building dependency tree Reading state information... 0%
Reading state information... 0%
Reading state information... Done The following packages will be REMOVED: libllvm5.0 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 49.1 MB disk space will be freed. (Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 48293 files and directories currently installed.) Removing libllvm5.0:arm64 (1:5.0-3~16.04.1) ... Processing triggers for libc-bin (2.23-0ubuntu10) ...

3、安装 update-manager-core

sudo apt install update-manager-core -y
Reading package lists... 0%Reading package lists... 100%Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree... 66%
Building dependency tree... 90%
Building dependency tree Reading state information... 0%Reading state information... 0%Reading state information... Done The following additional packages will be installed: python3-distupgrade python3-update-manager ubuntu-release-upgrader-core The following NEW packages will be installed: python3-distupgrade python3-update-manager ubuntu-release-upgrader-core update-manager-core 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 172 kB of archives. After this operation, 1,368 kB of additional disk space will be used. 0% [Working]0% [Waiting for headers]
 Get:1 http://ports.ubuntu.com xenial-updates/main arm64 python3-update-manager all 1:16.04.13 [32.6 kB] 7% [1 python3-update-manager 14.1 kB/32.6 kB 43%] 20% [Working] Get:2 http://ports.ubuntu.com xenial-security/main arm64 python3-distupgrade all 1:16.04.25 [104 kB] 20% [2 python3-distupgrade 0 B/104 kB 0%] 74% [Working] Get:3 http://ports.ubuntu.com xenial-security/main arm64 ubuntu-release-upgrader-core all 1:16.04.25 [29.6 kB] 87% [3 ubuntu-release-upgrader-core 29.6 kB/29.6 kB 100%] 92% [Working] Get:4 http://ports.ubuntu.com xenial-updates/main arm64 update-manager-core all 1:16.04.13 [5,496 B] 95% [4 update-manager-core 5,496 B/5,496 B 100%] 100% [Working] Fetched 172 kB in 1s (117 kB/s) Selecting previously unselected package python3-update-manager. (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 48287 files and directories currently installed.) Preparing to unpack .../python3-update-manager_1%3a16.04.13_all.deb ... Unpacking python3-update-manager (1:16.04.13) ... Selecting previously unselected package python3-distupgrade. Preparing to unpack .../python3-distupgrade_1%3a16.04.25_all.deb ... Unpacking python3-distupgrade (1:16.04.25) ... Selecting previously unselected package ubuntu-release-upgrader-core. Preparing to unpack .../ubuntu-release-upgrader-core_1%3a16.04.25_all.deb ... Unpacking ubuntu-release-upgrader-core (1:16.04.25) ... Selecting previously unselected package update-manager-core. Preparing to unpack .../update-manager-core_1%3a16.04.13_all.deb ... Unpacking update-manager-core (1:16.04.13) ... Processing triggers for man-db (2.7.5-1) ... Setting up python3-distupgrade (1:16.04.25) ... Setting up ubuntu-release-upgrader-core (1:16.04.25) ... Setting up python3-update-manager (1:16.04.13) ... Setting up update-manager-core (1:16.04.13) ...

4、升级到 18.04

sudo do-release-upgrade

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

关于作者

0 文章
0 评论
25 人气
更多

推荐作者

苍风燃霜

文章 0 评论 0

悸初

文章 0 评论 0

撧情箌佬

文章 0 评论 0

森罗

文章 0 评论 0

lyn1245

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文