Score:3

The following packages have unmet dependencies: linux-modules-5.15.0-50-generic

mu flag

I have updated my Ubuntu 22.04 LTS and I am getting some errors while updating and also coudn't able to install some softwares.

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:

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.

My kernal:

akhil@KHUSHI:~$ uname -r
5.15.0-52-generic

Full-Upgrade:

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:

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:

akhil@KHUSHI:~$ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `rpool/ROOT/ubuntu_zs8jjk'.
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).

Dependencies:

akhil@KHUSHI:~$ dpkg -L linux-image-5.15.0-50-generic
Package 'linux-image-5.15.0-50-generic' does not contain any files (!)
akhil@KHUSHI:~$ dpkg -l linux-image-5.15.0-50-generic
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version      Architecture Description
+++-=============================-============-============-===================>
pH  linux-image-5.15.0-50-generic 5.15.0-50.56 amd64        Signed kernel image>

[1]+  Stopped                 dpkg -l linux-image-5.15.0-50-generic

Force remove linux-modules-5.15.0-50-generic:

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
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)

ZFS List:

akhil@KHUSHI:~$ zfs list
NAME                                               USED  AVAIL     REFER  MOUNTPOINT
bpool                                              291M  1.47G       96K  /boot
bpool/BOOT                                         290M  1.47G       96K  none
bpool/BOOT/ubuntu_zs8jjk                           290M  1.47G      290M  /boot
rpool                                              120G   326G      192K  /
rpool/ROOT                                        25.0G   326G      192K  none
rpool/ROOT/ubuntu_zs8jjk                          25.0G   326G     15.2G  /
rpool/ROOT/ubuntu_zs8jjk/srv                       216K   326G      216K  /srv
rpool/ROOT/ubuntu_zs8jjk/usr                       261M   326G      192K  /usr
rpool/ROOT/ubuntu_zs8jjk/usr/local                 260M   326G      260M  /usr/local
rpool/ROOT/ubuntu_zs8jjk/var                      9.53G   326G      192K  /var
rpool/ROOT/ubuntu_zs8jjk/var/games                 216K   326G      216K  /var/games
rpool/ROOT/ubuntu_zs8jjk/var/lib                  9.42G   326G     9.20G  /var/lib
rpool/ROOT/ubuntu_zs8jjk/var/lib/AccountsService   260K   326G      260K  /var/lib/AccountsService
rpool/ROOT/ubuntu_zs8jjk/var/lib/NetworkManager    728K   326G      728K  /var/lib/NetworkManager
rpool/ROOT/ubuntu_zs8jjk/var/lib/apt               107M   326G      107M  /var/lib/apt
rpool/ROOT/ubuntu_zs8jjk/var/lib/dpkg              124M   326G      124M  /var/lib/dpkg
rpool/ROOT/ubuntu_zs8jjk/var/log                  96.1M   326G     96.1M  /var/log
rpool/ROOT/ubuntu_zs8jjk/var/mail                  216K   326G      216K  /var/mail
rpool/ROOT/ubuntu_zs8jjk/var/snap                 8.00M   326G     8.00M  /var/snap
rpool/ROOT/ubuntu_zs8jjk/var/spool                 324K   326G      324K  /var/spool
rpool/ROOT/ubuntu_zs8jjk/var/www                   216K   326G      216K  /var/www
rpool/USERDATA                                    93.9G   326G      192K  /
rpool/USERDATA/akhil_pltcof                       80.9G   326G     80.9G  /home/akhil
rpool/USERDATA/root_pltcof                        13.0G   326G     13.0G  /root
rpool/keystore                                     518M   327G     63.5M  -

I couldn't able to install new applications or run some of the existing apps or get software updates because of this issue.

mchid avatar
bo flag
Are you using ZFS? [ZFS Grub probe error failed to get canonical path of dev disk name](https://askubuntu.com/questions/827126/zfs-grub-probe-error-failed-to-get-canonical-path-of-dev-disk-name)
Akhil Akkapelli avatar
mu flag
I have shown the output of "zfs list" command @mchid
Score:4
bo flag

Problems:

First of all, you have some Ubuntu Impish repositories that I assume were manually added. Ubuntu Impish (21.10) is now EOL so it's no longer supported and the repositories have since been disabled.

Next, the AMCG ppa was last available for Ubuntu Xenial.

Under "Overview of published packages", click on the dropdown menu for "Published in: Any series" filter and you will see this PPA was only available for Xenial and Trusty.

screenshot of the launchpad page for the amcg ppa showing only packages for Xenial and Trusty were published

Additionally, Anbox support ppa is no longer necessary on kernels newer than version 5.0. Any Ubuntu version newer than 19.04 does not need the extra kernel modules provided by the anbox-support PPA.

Starting with Ubuntu 19.04 binder and ashmem are now build with the standard Ubuntu kernel (>= 5.0) and you don't have to install the modules from the PPA anymore.

Solution:

The easiest solution would be to delete or comment out the lines for Ubuntu Impish in your sources list file.

Then, delete the unneeded PPA repositories by using the add-apt-repository -r command:

sudo add-apt-repository -r ppa:amcg/ppa
sudo add-apt-repository -r ppa:morphis/anbox-support

Also, it looks like you may need to reinstall the Brave browser because it's throwing a signature error. Be sure to backup your current Brave Browser in case you lose your bookmarks and settings. Although this is probably outside of the scope for this question, you can ask the community and open a new question if you need help with this.

And then run:

sudo apt update

and if you get no errors:

sudo apt full-upgrade

and if you have problems you may need to run:

sudo apt -f install

with no packages mentioned — just run the last command as is and it will try to fix any problems with broken packages. Always be sure to pay attention to the output and only select Y if you are sure you want to proceed as this may delete or uninstall packages.

When you no longer have any errors, verify everything is updated/upgraded:

sudo apt update
sudo apt full-upgrade
mchid avatar
bo flag
Please post any errors. It looks like you had 2 PPAs for anbox-support so if the `add-apt-repository -r` command doesn't delete both of them, either run the `sudo add-apt-repository -r ppa:morphis/anbox-support` command again to delete the second one OR as a last resort, simply locate the file in your `/etc/apt/sources.list.d` directory that corresponds to the morphis/anbox-support PPA and manually delete the file.
Andy M avatar
za flag
I am facing similar problem while trying to install or upgrade with linux-image-5.15.0-50 generic I followed above solution still the same. Please advise.
Organic Marble avatar
us flag
@AndyM ask a new question, don't post it as an answer or comment
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.