我使用 Ubuntu 16.04 并且想要升级。
root@desktop:/# lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
root@desktop:/# apt-get update
Hit:1 http://gb.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:3 http://ppa.launchpad.net/hda-me/higan/ubuntu xenial InRelease
Get:4 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:5 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Hit:6 http://archive.canonical.com/ubuntu xenial InRelease
Hit:7 http://archive.canonical.com xenial InRelease
Fetched 323 kB in 0s (482 kB/s)
Reading package lists... Done
root@desktop:/# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
root@desktop:/# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
root@desktop:/# do-release-upgrade
Checking for a new Ubuntu release
No new release found.
它认为它不需要升级。
今天早些时候我运行了apt-get dist-upgrade
,输出似乎表明升级成功了。这是 /var/log/apt/history.log
Start-Date: 2018-06-25 14:09:40
Commandline: apt-get dist-upgrade
Requested-By: admin (1000)
Install: libqpdf21:amd64 (8.0.2-3~16.04.1, automatic), intel-microcode:amd64 (3.20180425.1~ubuntu0.16.04.1, automatic), iucode-tool:amd64 (1.5.1-1ubuntu0.1, automatic), linux-headers-4.4.0-128:amd64 (4.4.0-128.154, automatic), linux-headers-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), libqmi-glib5:amd64 (1.16.2-1ubuntu0.16.04.1, automatic), amd64-microcode:amd64 (3.20180524.1~ubuntu0.16.04.1, automatic), libwebpdemux1:amd64 (0.4.4-1, automatic), libllvm5.0:amd64 (1:5.0-3~16.04.1, automatic), linux-image-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-signed-image-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-image-extra-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), libdrm-common:amd64 (2.4.83-1~16.04.1, automatic)
Upgrade: perl-base:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), libqmi-proxy:amd64 (1.12.6-1, 1.16.2-1ubuntu0.16.04.1), libgcrypt20-dev:amd64 (1.6.5-2ubuntu0.4, 1.6.5-2ubuntu0.5), libimage-magick-perl:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), linux-headers-generic:amd64 (4.4.0.97.102, 4.4.0.128.134), libdrm-nouveau2:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), linux-libc-dev:amd64 (4.4.0-127.153, 4.4.0-128.154), gnupg-agent:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), scdaemon:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), ruby2.3:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), libimage-magick-q16-perl:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libegl1-mesa-dev:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.8-0ubuntu0~16.04.1), imagemagick:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), linux-image-generic:amd64 (4.4.0.97.102, 4.4.0.128.134), libmagickwand-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), linux-signed-image-generic:amd64 (4.4.0.97.102, 4.4.0.128.134), perl-modules-5.22:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), console-setup-linux:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), libxatracker2:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.8-0ubuntu0~16.04.1), console-setup:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), flashplugin-installer:amd64 (29.0.0.171ubuntu0.16.04.1, 30.0.0.113ubuntu0.16.04.1), libegl1-mesa:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.8-0ubuntu0~16.04.1), libmagic1:amd64 (1:5.25-2ubuntu1, 1:5.25-2ubuntu1.1), libgcrypt11-dev:amd64 (1.5.4-3+really1.6.5-2ubuntu0.4, 1.5.4-3+really1.6.5-2ubuntu0.5), linux-signed-generic:amd64 (4.4.0.97.102, 4.4.0.128.134), perl-doc:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), libgbm1:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.8-0ubuntu0~16.04.1), dirmngr:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), libperl5.22:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), libdrm-amdgpu1:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), cups-filters:amd64 (1.8.3-2ubuntu3.1, 1.8.3-2ubuntu3.4), imagemagick-6.q16:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libmagickcore-6.q16-2-extra:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libruby2.3:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), firefox-locale-en:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), libwayland-egl1-mesa:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.8-0ubuntu0~16.04.1), libgcrypt20:amd64 (1.6.5-2ubuntu0.4, 1.6.5-2ubuntu0.5), gpgv:amd64 (1.4.20-1ubuntu3.1, 1.4.20-1ubuntu3.2), libmm-glib0:amd64 (1.4.12-1ubuntu1, 1.6.4-1ubuntu0.16.04.1), libdrm2:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), libwebkit2gtk-4.0-37:amd64 (2.18.5-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), libgl1-mesa-dri:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.8-0ubuntu0~16.04.1), libmagickcore-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), keyboard-configuration:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), libvirt0:amd64 (1.3.1-1ubuntu10.23, 1.3.1-1ubuntu10.24), qpdf:amd64 (6.0.0-2, 8.0.2-3~16.04.1), gnupg2:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), cups-filters-core-drivers:amd64 (1.8.3-2ubuntu3.1, 1.8.3-2ubuntu3.4), file:amd64 (1:5.25-2ubuntu1, 1:5.25-2ubuntu1.1), libdrm-intel1:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), firefox:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), perl:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), modemmanager:amd64 (1.4.12-1ubuntu1, 1.6.4-1ubuntu0.16.04.1), imagemagick-common:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libmagick++-6.q16-5v5:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libdrm-radeon1:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), mesa-vdpau-drivers:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.8-0ubuntu0~16.04.1), gnupg:amd64 (1.4.20-1ubuntu3.1, 1.4.20-1ubuntu3.2), desktop-file-utils:amd64 (0.22-1ubuntu5.1, 0.22-1ubuntu5.2), libjavascriptcoregtk-4.0-18:amd64 (2.18.5-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), libdrm-dev:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), linux-generic:amd64 (4.4.0.97.102, 4.4.0.128.134), wireless-regdb:amd64 (2015.07.20-1ubuntu1, 2018.05.09-0ubuntu1~16.04.1), libwebkit2gtk-4.0-37-gtk2:amd64 (2.18.5-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), gpgsm:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1)
End-Date: 2018-06-25 14:12:54
Start-Date: 2018-06-25 14:16:01
Commandline: apt-get autoremove
Requested-By: admin (1000)
Remove: libqpdf17:amd64 (6.0.0-2), linux-headers-4.4.0-72-generic:amd64 (4.4.0-72.93), libllvm4.0:amd64 (1:4.0-1ubuntu1~16.04.2), linux-headers-4.4.0-72:amd64 (4.4.0-72.93), libgeoclue0:amd64 (0.12.99-4ubuntu1), linux-signed-image-4.4.0-72-generic:amd64 (4.4.0-72.93), linux-image-4.4.0-72-generic:amd64 (4.4.0-72.93), linux-image-extra-4.4.0-72-generic:amd64 (4.4.0-72.93)
End-Date: 2018-06-25 14:16:24
然后我重新启动并lsb_release -a
显示我仍在运行 16.04。
我如何升级?
答案1
我敢打赌如果你跑步的话grep '^Prompt=' /etc/update-manager/release-upgrades
你会看到这个:
Prompt=lts
这意味着您想要升级到下一个长期支持版本。
尽管 Ubuntu 18.04 LTS 已于近两个月前(2018 年 4 月 26 日)发布,但do-release-upgrade
直到大约一个月后(2018 年 7 月 26 日),版本 18.04.1 才会将 Ubuntu 18.04 LTS 视为下一个 LTS。
为何这样做,请参阅“为什么从 LTS 升级到下一个 LTS 时会出现“未发现新版本”的情况?“ 在询问 Ubuntu。
如何升级
无论如何,升级到 Ubuntu 18.04 LTS 的最简单方法是以 root 身份运行此命令:
do-release-upgrade -d
您也可以Prompt=
编辑/etc/update-manager/release-upgrades
阅读
Prompt=normal
然后以 root 身份运行:
do-release-upgrade