ubuntu 从 14.04 升级到 16.04:dpkg 返回错误代码 (1)

ubuntu 从 14.04 升级到 16.04:dpkg 返回错误代码 (1)

我如何修复这些错误

$sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  apg cups-pk-helper gkbd-capplet libgnomekbd8 ubuntu-system-service unity-control-center-faces
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  console-setup initscripts plymouth
Suggested packages:
  plymouth-themes
The following packages will be REMOVED:
  linux-image-3.13.0-71-generic linux-image-4.4.0-47-generic linux-image-extra-3.13.0-71-generic linux-image-extra-4.4.0-47-generic
The following NEW packages will be installed:
  console-setup initscripts plymouth
0 upgraded, 3 newly installed, 4 to remove and 1 not upgraded.
1245 not fully installed or removed.
Need to get 0 B/249 kB of archives.
After this operation, 412 MB disk space will be freed.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
(Reading database ... 569134 files and directories currently installed.)
Removing linux-image-extra-3.13.0-71-generic (3.13.0-71.114) ...
depmod: FATAL: could not load /boot/System.map-3.13.0-71-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-71-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_1KIMbX/lib/modules/3.13.0-71-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_1KIMbX/lib/modules/3.13.0-71-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
Generating grub configuration file ...
grub-probe: error: disk `md0' not found.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-71-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.13.0-71-generic (3.13.0-71.114) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-71-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
Generating grub configuration file ...
grub-probe: error: disk `md0' not found.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.13.0-71-generic.postrm line 328.
dpkg: error processing package linux-image-3.13.0-71-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.4.0-47-generic (4.4.0-47.68) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-47-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_Jupqi6/lib/modules/4.4.0-47-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_Jupqi6/lib/modules/4.4.0-47-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
Generating grub configuration file ...
grub-probe: error: disk `md0' not found.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-47-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-47-generic (4.4.0-47.68) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-47-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
Generating grub configuration file ...
grub-probe: error: disk `md0' not found.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-47-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-47-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-3.13.0-71-generic
 linux-image-3.13.0-71-generic
 linux-image-extra-4.4.0-47-generic
 linux-image-4.4.0-47-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo apt-get upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 kbd : Depends: console-setup but it is not installed or
                console-setup-mini but it is not installed
 keyboard-configuration : Depends: initscripts
 lightdm : Depends: plymouth (>= 0.8.8-0ubuntu18) but it is not installed
           Recommends: unity-greeter but it is not installed or
                       lightdm-greeter or
                       lightdm-kde-greeter but it is not installed
 mountall : Depends: plymouth but it is not installed
 nfs-common : Depends: initscripts (>= 2.88dsf-13.10ubuntu1)
 plymouth-label : Depends: plymouth (= 0.9.2-3ubuntu13.1) but it is not installed
 plymouth-theme-ubuntu-logo : Depends: plymouth (= 0.9.2-3ubuntu13.1) but it is not installed
 procps : Depends: initscripts
 rpcbind : Depends: initscripts (>= 2.88dsf-13.3)
E: Unmet dependencies. Try using -f.

$ sudo apt-get update    
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu xenial InRelease      
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]                          
Hit:4 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial InRelease
Hit:5 http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu xenial InRelease                                     
Hit:6 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial InRelease                                    
Hit:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease        
Hit:8 http://archive.ubuntu.com/ubuntu xenial-security InRelease                
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [420 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [414 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [359 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [355 kB]
Fetched 1643 kB in 2s (623 kB/s)                          
Reading package lists... Done

相关内容