29

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
  • 19,191
  • 32
  • 112
  • 191
Feders
  • 291

7 Answers7

17

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

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

1

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

sudo apt autoremove

fixed it for me.

qwr
  • 2,969
1

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,588
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
-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