I have updated my Ubuntu 22.04 LTS and I got some errors while updating and I coudn't able to install new softwares or run some of my old softwares.
Upgrade:
Code:
akhil@KHUSHI:~/.config$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Update:
Code:
akhil@KHUSHI:~/.config$ sudo apt-get update
Hit:1 https://deb.nodesource.com/node_16.x jammy InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 https://packages.microsoft.com/repos/edge stable InRelease
Hit:5 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease
Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:7 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Hit:8 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:9 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
W: https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Full Upgrade:
Code:
akhil@KHUSHI:~/.config$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Fix Broken Packages:
Code:
akhil@KHUSHI:~/.config$ sudo apt -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-unsigned-5.15.0-50-generic
Suggested packages:
fdutils linux-doc | linux-source-5.15.0 linux-tools
linux-headers-5.15.0-50-generic linux-modules-extra-5.15.0-50-generic
The following packages will be REMOVED:
linux-image-5.15.0-50-generic
The following NEW packages will be installed:
linux-image-unsigned-5.15.0-50-generic
0 upgraded, 1 newly installed, 1 to remove and 8 not upgraded.
6 not fully installed or removed.
Need to get 0 B/11.6 MB of archives.
After this operation, 379 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: linux-image-5.15.0-50-generic: dependency problems, but removing anyway as
you requested:
linux-modules-5.15.0-50-generic depends on linux-image-5.15.0-50-generic | linu
x-image-unsigned-5.15.0-50-generic; however:
Package linux-image-5.15.0-50-generic is to be removed.
Package linux-image-unsigned-5.15.0-50-generic is not installed.
(Reading database ... 331119 files and directories currently installed.)
Removing linux-image-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-50-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_
zs8jjk'.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-50-generic (--remove):
installed linux-image-5.15.0-50-generic package post-removal script subprocess
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.15.0-50-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Update GRUB:
Code:
akhil@KHUSHI:~$ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_zs8jjk'.
Code:
akhil@KHUSHI:~$ sudo apt-get install --reinstall grub-efi-amd64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-modules-5.15.0-50-generic : Depends: linux-image-5.15.0-50-generic but it is not going to be installed or
linux-image-unsigned-5.15.0-50-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Force remove linux-modules-5.15.0-50-generic:
Code:
akhil@KHUSHI:~$ sudo dpkg --purge --force-remove-reinstreq linux-image-5.15.0-50-generic
(Reading database ... 329778 files and directories currently installed.)
Removing linux-image-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-50-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_zs8jjk'.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-50-generic (--purge):
installed linux-image-5.15.0-50-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-5.15.0-50-generic
Code:
akhil@KHUSHI:~$ sudo apt-get remove --purge linux-image-5.15.0-50-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
linux-image-5.15.0-50-generic
0 upgraded, 0 newly installed, 1 to remove and 22 not upgraded.
2 not fully installed or removed.
After this operation, 11.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 329778 files and directories currently installed.)
Removing linux-image-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-50-generic
/etc/kernel/postrm.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_zs8jjk'.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-50-generic (--remove):
installed linux-image-5.15.0-50-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.15.0-50-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
I couldn't able to install new applications or run some of the existing apps or get software updates because of this issue.
I trying for the solution from lot of days in the internet and I couldn't able to find the solution.