Problem
I'm getting the following error when trying to install Nvidia-drivers on ubuntu 22.04.2(not22.04.1). If anyone knows how to deal with this, please let me know.
$ sudo ubuntu-drivers install
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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:
linux-modules-nvidia-525-open-generic-hwe-22.04 : Depends: linux-modules-nvidia-525-open-5.19.0-35-generic (= 5.19.0-35.36~22.04.1) but it is not going to be installed
Depends: nvidia-kernel-common-525 (>= 525.85.05) but 525.78.01-0ubuntu0.22.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Tried
# edited the following file
/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py
- version = int(package_name.split('-')[-1])
+ version = int(package_name.split('-')[2])