25

I keep getting this error when I try running sudo apt-get install nvidia-current:

Reading package lists... Done
Building dependency tree       
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:
 nvidia-current : Depends: xorg-video-abi-11
                  Depends: xserver-xorg-core (>= 2:1.10.99.901)
E: Unable to correct problems, you have held broken packages.

How do I fix this?

Lucio
  • 18,843
Feders
  • 251
  • have you tried with sudo apt-get install -f – Raja G Feb 24 '13 at 03:14
  • The following packages were automatically installed and are no longer required: dkms linux-headers-3.5.0-23 linux-headers-3.5.0-18 linux-headers-3.5.0-23-generic linux-headers-3.5.0-18-generic Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. – Feders Feb 24 '13 at 03:17
  • Nothing changed after sudo apt-get autoremove, apart from removing the non-required packages. – Feders Feb 24 '13 at 03:19
  • do this sudo apt-get install xorg-video-abi-11 xserver-xorg-core – Raja G Feb 24 '13 at 03:21
  • I can put more info in my answer if you list your specific graphics card name (: – Richard Feb 24 '13 at 04:03

7 Answers7

14

To solve

E: Unable to correct problems, you have held broken packages.

Try:

sudo apt-get install --fix-broken xorg-video-abi-11 xserver-xorg-core -y

This trick worked for me

Another option will be:

sudo apt-get remove --purge nvidia-* -y
sudo ubuntu-drivers autoinstall
sudo service lightdm restart

Then reboot machine

Appy
  • 3
  • 2
9
sudo apt-get remove --purge nvidia-* -y
sudo apt autoremove
sudo ubuntu-drivers autoinstall
sudo service lightdm restart
sudo reboot

This is what worked for me!

anjandash
  • 191
  • 1
    This worked for me as well. Ubuntu 20.04, RTX2060 Mobile.Thank you! – Jacob M. Sep 03 '22 at 13:42
  • 1
    Worked like a charm, but the default drivers did not work well for me. Running sudo apt install nvidia-driver-515 nvidia-dkms-515 after this installed the correct drivers for me. – Yash Nag Dec 14 '22 at 07:51
  • Somehow works for me, but it rolled back to the last ubuntu-tested version of the driver. Which is quite old. (Ubuntu 22.04 - GeForce RTX 3070 Ti) – Opsse Jan 15 '24 at 15:56
1

I had some leftover packages from a previous nvidia purge that caused issues.

sudo apt autoremove

fixed it for me.

qwr
  • 2,802
0

Based on the discussion here I fixed this by sudo apt-get purge libnvidia-* followed by sudo ubuntu-drivers autoinstall

0

This problem arises from an Xorg/nVidia bug where nVidia's driver is incompatible with some of the code in the latest Xorg version. You can try installing the drivers with Software Sources (Additional Drivers tab), or jockey-text in the terminal (which you can learn how to use with a quick Google search or jockey-text --help), or by checking for your drivers at the nVidia website at http://www.geforce.com/drivers (use the Manual Driver Search). Installing the drivers using apt will not work until the issue is fixed sometime in the future.

If you need instructions for installing drivers from nVidia's website, follow the guide here: https://help.ubuntu.com/community/NvidiaManual

Richard
  • 8,502
  • 11
  • 47
  • 72
0

As noted by 'rajagenupula' user. Special thanks to 'rajagenupula' user

Install older (12.04.1) version of xserver and you can install cuda with with the necessary driver (apt package nvidia-current).

sudo apt-get install xorg-video-abi-11 xserver-xorg-core

vskubriev
  • 905
  • 7
  • 14
-1

remove sources.list file.and create new sources.list...

sudo rm /etc/apt/sources.list 

Then, type in

sudo software-properties-gtk 

enter image description here This will open software-properties-gtk and a newsources.list will be created automatically.

Then change the server to US or to any other server of your choice. You must enable repositories from the new dialog in order to create new sources.list.

Tick all the boxes then click on Revert then click close.

Need to restore default repositories

 sudo apt-get update && sudo apt-get dist-upgrade -y

(it is good practice to backup this file before installing to recover if such things happen)

minigeek
  • 1,071