从 16.04 升级到 18.04 时出现的问题

从 16.04 升级到 18.04 时出现的问题

我尝试从 16.04 升级到 18.04。但我遇到了一些问题。

nuc ➜  ~  sudo apt update                              
Hit:1 http://se.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:3 http://se.archive.ubuntu.com/ubuntu bionic-updates InRelease                   
Hit:4 http://se.archive.ubuntu.com/ubuntu bionic-backports InRelease                 
Fetched 88,7 kB in 0s (164 kB/s)                               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1919 packages can be upgraded. Run 'apt list --upgradable' to see them.
nuc ➜  ~  sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-aptdaemon.pkcompat : Conflicts: packagekit
                              Conflicts: packagekit:i386
E: Broken packages

我尝试删除冲突的软件包:

nuc ➜  ~  sudo apt remove packagekit packagekit:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'packagekit' is not installed, so not removed
Package 'packagekit:i386' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  amd64-microcode thermald
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1919 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-unsigned-4.15.0-45-generic (4.15.0-45.48) ...
Processing triggers for linux-image-unsigned-4.15.0-45-generic (4.15.0-45.48) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-45-generic
cp: failed to restore the default file creation context: Invalid argument
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
cp: failed to restore the default file creation context: Invalid argument
E: /usr/share/initramfs-tools/hooks/kmod failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.15.0-45-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-unsigned-4.15.0-45-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-unsigned-4.15.0-45-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

任何建议都会有帮助!

答案1

我尝试了 spinState010 的建议,但它没有解决我的问题。我做的是:

sudo apt remove python3-aptdaemon.pkcompat

因此,您可以尝试一下,然后让我们知道它是否对您有用。

答案2

在进行发行版更新之前,请确保备份了重要文件和文件系统。我建议使用rsync任何类型的文件系统备份。你试过吗

sudo apt clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade 

相关内容