Kubuntu 18.04.2 不会升级

Kubuntu 18.04.2 不会升级

我家用的塔式电脑上运行着 Kubuntu 18.04.2。这款 Kubuntu 于 2017 年 11 月 2 日首次安装为 Kubuntu 17.10 64 位。

一路上我不断更新,就像我说的,现在版本是 18.04.2。18.04 发布时,我想继续使用 LTS 版本。我不记得我是如何从 17.10 升级到 18.04.2 的。

我已经很久没用过 Kubuntu 了,直到最近才开始用。现在我发现 Kubuntu LTS 的版本是 18.04.4,所以我尝试升级它。

嗯,它不会升级,甚至不会升级到 18.04.3。

我在“询问 ubuntu”上搜索了一下,发现了一些提示。

现在我的系统已经根据 apt 进行了全面更新:

root@eagle-kubuntu:~# apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]       
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                 
Fetched 252 kB in 1s (238 kB/s)                                                             
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
root@eagle-kubuntu:~# 

当我运行 dist-upgrade 时,我得到了这个:

root@eagle-kubuntu:~# apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@eagle-kubuntu:~#

我读到过某处说我可能需要确保安装了“linux-image-generic”,所以当我运行“# apt install linux-image-generic”时,我得到了这个:

root@eagle-kubuntu:~# apt install linux-image-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-image-generic is already the newest version (4.15.0.88.80).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@eagle-kubuntu:~#

供参考,这是我的 lsb-release 文件:

[jcig@eagle-kubuntu ~]$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Kubuntu 18.04.2 LTS"
[jcig@eagle-kubuntu ~]$

所以我的问题是,有没有办法无需重新安装即可解决这个问题?

感谢您的输入。

以下是我运行“sudo apt update”和“sudo apt full-upgrade”的输出:

[jcig@eagle-kubuntu ~]$ sudo apt update
[sudo] password for jcig: 
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease       
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease      
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done                     
Building dependency tree       
Reading state information... Done
All packages are up to date.
[jcig@eagle-kubuntu ~]$ 
[jcig@eagle-kubuntu ~]$ 
[jcig@eagle-kubuntu ~]$ 
[jcig@eagle-kubuntu ~]$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[jcig@eagle-kubuntu ~]$

‘apt policy base-files’ 的输出:

[jcig@eagle-kubuntu ~]$ sudo apt policy base-files
[sudo] password for jcig: 
base-files:
  Installed: 10.1ubuntu2.8
  Candidate: 10.1ubuntu2.8
  Version table:
 *** 10.1ubuntu2.8 500
        500 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     10.1ubuntu2.2 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     10.1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
[jcig@eagle-kubuntu ~]$

思考我可能知道发生了什么。我还在这台机器上安装了 Linuxmint。我将其用作“主”Grub 发行版。这意味着我使用它来使 Grub 在 sda 上保持最新。以前,当我update-grub在 Linuxmint 上运行时,其他 Ubuntu 安装在 Grub 菜单中会简单地显示为“Ubuntu-...”。因此,在 Kubuntu 中,我将 lsb-release 文件的“DISTRIB_ID”行编辑为“Kubuntu ...”之类的内容,以便它在菜单中显示为 Kubuntu。后来我发现我不再需要这样做了。所以我最近将这个 Kubuntu lsb-release 文件改回原始文件。那么,这是否会导致此问题?

输出sudo apt install --reinstall base-files

[jcig@eagle-kubuntu ~]$ sudo apt install --reinstall base-files
[sudo] password for jcig: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/59.9 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 230458 files and directories currently installed.)
Preparing to unpack .../base-files_10.1ubuntu2.8_amd64.deb ...
Warning: Stopping motd-news.service, but it can still be activated by:
  motd-news.timer
Unpacking base-files (10.1ubuntu2.8) over (10.1ubuntu2.8) ...
Setting up base-files (10.1ubuntu2.8) ...
motd-news.service is a disabled or a static unit, not starting it.
Processing triggers for plymouth-theme-ubuntu-text (0.9.3-1ubuntu7.18.04.2) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for cracklib-runtime (2.9.2-5build1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for plymouth-theme-kubuntu-text (1:18.04ubuntu11) ...
dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit
rmdir: failed to remove '/lib/plymouth/': No such file or directory
update-initramfs: deferring update (trigger activated)
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-88-generic
W: initramfs-tools configuration sets RESUME=UUID=55b8765f-38ea-41c3-a3b3-a357234bd848
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/sda9
I: (UUID=0f0586fe-6d88-4932-be6a-04beb11e0939)
I: Set the RESUME variable to override this.
[jcig@eagle-kubuntu ~]$

‘cat /etc/lsb-release’ 的最新输出:

[jcig@eagle-kubuntu ~]$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Kubuntu 18.04.2 LTS"
[jcig@eagle-kubuntu ~]$

答案1

尝试使用升级进行发布升级

sudo do-release-upgrade

升级服务器版安装的推荐方法是使用 do-release-upgrade 实用程序。它是 update-manager-core 软件包的一部分,不具有任何图形依赖性,并且默认安装。

基于 Debian 的系统也可以使用 apt dist-upgrade 进行升级。但是,建议使用 do-release-upgrade,因为它能够处理有时在版本之间需要的系统配置更改。

在某些情况下这是行不通的

当我运行 sudo do-release-upgrade 时,它​​显示:Please install all available updates for your release before upgrading.没有发生升级。

我可以通过运行来解决这个问题sudo do-release-upgrade -c

然后再次运行sudo do-release-upgrade命令。

相关内容