Ubuntu – Unmet dependencies (linux-headers, linux-image)

aptdependenciespackage-managementsoftware installation

I am trying to install a program on my Linux.
When running: sudo apt-get install nams I keep getting:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
         linux-image-extra-4.4.0-71-generic :   
          Depends: linux-image-4.4.0-71-generic but it is not going to be installed
         linux-image-generic :  
          Depends: linux-image-4.4.0-71-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I tried to fix it doing: sudo apt-get -f install

Best Answer

Seems like you have double sources in your plist.

To fix this issue:

sudo apt-get clean
sudo apt-get autoclean
sudo apt-get -f install

Then run :

sudo dpkg --configure -a
sudo apt-get -f install

Also you can comment out the double source in the sources.list

If you need help, print the output of the sources.list and show me.

Like this :

cat /etc/apt/sources.list > /home/user/sources.txt

If you wanne do it yourself just use nano or vim :

sudo nano /etc/apt/sources.list