升级 18.04 -> 18.10 后出现的问题

升级 18.04 -> 18.10 后出现的问题

昨天,我将 Ubuntu 18.04 升级到 18.10。升级过程中出现了一些我记不住或复制不了的错误/警告。不过,如果我apt update & apt upgrade现在这样做,我会收到以下错误:

The following packages will be upgraded:
  linux-image-4.18.0-17-generic linux-modules-4.18.0-17-generic
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/21.6 MB of archives.
After this operation, 1,136 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 321219 files and directories currently installed.)
Preparing to unpack .../linux-modules-4.18.0-17-generic_4.18.0-17.18_amd64.deb ...
Unpacking linux-modules-4.18.0-17-generic (4.18.0-17.18) over (4.18.0-17.18~18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-modules-4.18.0-17-generic_4.18.0-17.18_amd64.deb (--unpack):
 unable to make backup link of './boot/System.map-4.18.0-17-generic' before installing new version: Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../linux-image-4.18.0-17-generic_4.18.0-17.18_amd64.deb ...
Unpacking linux-image-4.18.0-17-generic (4.18.0-17.18) over (4.18.0-17.18~18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.18.0-17-generic_4.18.0-17.18_amd64.deb (--unpack):
 unable to make backup link of './boot/vmlinuz-4.18.0-17-generic' before installing new version: Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/linux-modules-4.18.0-17-generic_4.18.0-17.18_amd64.deb
 /var/cache/apt/archives/linux-image-4.18.0-17-generic_4.18.0-17.18_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

显示uname -a新内核已安装:

Linux 4.18.0-20-generic #21-Ubuntu SMP Mon May 6 18:45:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

因此,我想知道为什么 apt 尝试安装 4.18.0-17 软件包......

有什么想法吗?

编辑:sources.list 中没有什么不寻常的

root@pumpkin:~# cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ cosmic main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ cosmic-security main restricted universe multiverse

# deb https://packages.grafana.com/oss/deb stable main
# deb-src https://packages.grafana.com/oss/deb stable main

答案1

好吧,我设法解决了我的问题:

升级之前,我刚刚删除了更新程序无法备份的文件。

/boot/System.map-4.18.0-17-generic 
/boot/vmlinuz-4.18.0-17-generic

尽管从启动文件夹中删除文件感觉不太对。但无论如何,它还是成功了。

相关内容