1

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])
chess
  • 21
  • 3

1 Answers1

1

Solved by following command. sudo ubuntu-drivers install nvidia:515

It seems that 525 does not match the kernel version of ubuntu22.04.2.

chess
  • 21
  • 3
  • Try the 525 driver without the "-open" at the end of the name. That extra piece of name might have messed up some scripts. – ubfan1 Mar 27 '23 at 15:55
  • Ubuntu 22.04.2 could and can run many different kernels so that is not correct. – David Mar 29 '23 at 10:33