3

This question already has an answer here:

After upgrading my install from 14.04 to 16.04 on a notebook which has Nvidia GT 740M, I want to change GPU driver from Software & Updates > Additional Drivers. System identifies my graphic card, no problem but when I select a proprietary driver and apply changes after a few seconds, change bar stops and nouveau selected by default again.

I ran this command:

sudo apt-get install nvidia-370

but output says you have held broken packages

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-370 : Depends: lib32gcc1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I also tried:

sudo apt-get install lib32gcc1

But it says:

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:
lib32gcc1 : Depends: gcc-6-base (= 6.0.1-0ubuntu1)  
            but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I've tried using main server, but that didn't solve my problem. I also tried to fix broken packages with the following commands:

sudo dpkg --configure -a
sudo apt-get purge
sudo apt-get clean

Results of running: apt policy lib32stdc++6 gcc-6-base lib32gcc1

lib32stdc++6:
  Instalados: (ninguno)
  Candidato:  5.4.0-6ubuntu1~16.04.2
  Tabla de versión:
     5.4.0-6ubuntu1~16.04.2 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     5.3.1-14ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
gcc-6-base:
  Instalados: 6.2.0-3ubuntu11~14.04
  Candidato:  6.2.0-3ubuntu11~14.04
  Tabla de versión:
 *** 6.2.0-3ubuntu11~14.04 100
        100 /var/lib/dpkg/status
     6.0.1-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
lib32gcc1:
  Instalados: (ninguno)
  Candidato:  1:6.0.1-0ubuntu1
  Tabla de versión:
     1:6.0.1-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

It seems that gcc-6-base refers to 14.04 still.

marked as duplicate by karel, Eric Carvalho, waltinator, user68186, David Foerster Apr 12 '18 at 21:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Install synaptic package manager and if any broken packages r there status tab of synaptic shows them and u can remove broken packages.. – minigeek Sep 20 '16 at 12:53
  • However try: sudo apt-get install -f this will try to reinstall broken package..if this doenst work then try synaptic – minigeek Sep 20 '16 at 12:54
  • Ok, thanks for the answer. I tried sudo apt-get install -f and nothing weird shows only the "zero packages to Install/Update message". Then I tried with the synaptic but in the broken packages section nothing came out, only when y mark the nvidia-370 package to install it shows as a broken one and it doesn't let me install it. I'm start thinking that a fresh install may solve it. Thanks for the help. – nfs5cgd Sep 23 '16 at 12:28
  • No don't do it...u can still refresh your source.list..and create a new one – minigeek Sep 23 '16 at 12:30
  • I posted an answer see if it helps and let me know – minigeek Sep 23 '16 at 12:33
1
sudo apt-get autoclean

It is last end solution : 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)

Not the answer you're looking for? Browse other questions tagged or ask your own question.