0

I am unable to upgrade Ubuntu 14.04 or install any new software as I always get the following error:

Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libc6-dev : Depends: linux-libc-dev but it is not going to be installed
 libnss3 : Breaks: libnss3:i386 (!= 2:3.19.2-1ubuntu1) but 2:3.26.2-0ubuntu0.14.04.3 is to be installed
 libnss3:i386 : Breaks: libnss3 (!= 2:3.26.2-0ubuntu0.14.04.3) but 2:3.19.2-1ubuntu1 is to be installed
 libnss3-nssdb : Depends: libnss3 (= 2:3.26.2-0ubuntu0.14.04.3) but 2:3.19.2-1ubuntu1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I tried running

sudo apt-get -f install

but it doesn't work as I get the following error in output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  account-plugin-windows-live kde-l10n-ar kde-l10n-engb libntdb1 libupstart1
  linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
  linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic
  python-ntdb python-pexpect python-renderpm python-reportlab
  python-reportlab-accel
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libnss3
The following packages will be upgraded:
  libnss3
1 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.
3 not fully installed or removed.
Need to get 1,126 kB of archives.
After this operation, 30.7 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libnss3 amd64 2:3.26.2-0ubuntu0.14.04.3 [1,126 kB]
Fetched 1,126 kB in 5s (214 kB/s)    
(Reading database ... 292354 files and directories currently installed.)
Preparing to unpack .../libnss3_2%3a3.26.2-0ubuntu0.14.04.3_amd64.deb ...
Unpacking libnss3:amd64 (2:3.26.2-0ubuntu0.14.04.3) over (2:3.19.2-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libnss3_2%3a3.26.2-0ubuntu0.14.04.3_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libnss3/changelog.Debian.gz', which is different from other instances of package libnss3:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libnss3_2%3a3.26.2-0ubuntu0.14.04.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Edit: There is an error icon appearing just next to clock in top status bar, which contains text

An error occurred, please run Package Manager from the right-click menu or apt-get in a terminal to see what is wrong. The error message was: 'Error: Brokencount > 0'. This usually means you installed packages have unmet dependencies.

By clicking on Show Updates in this icon menu I get window (New Important Security and hardware support update.

WARNING: Security updates for your current hardware Enablement stack ended on 2016-08-04 http://wiki.ubuntu.com/1404_HWE_EOL

By trying to click install on this window, it still gives me an error installing.

How can I fix my system so that I can upgrade?

Zanna
  • 70,465
Mark J
  • 1

1 Answers1

0

The problem is explained in the error message:

dpkg: error processing archive /var/cache/apt/archives/libnss3_2%3a3.26.2-0ubuntu0.14.04.3_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libnss3/changelog.Debian.gz', which is different from other instances of package libnss3:amd64

This is a rare error, and can have several possible causes. If this error recurs frequently, then DON'T keep fixing it over and over - you have a deeper problem that must be investigated and fixed.

How to fix: Since you probably are not using the changelog file, try renaming it. If the install succeeds, you can safely delete it.

sudo mv /usr/share/doc/libnss3/changelog.Debian.gz /usr/share/doc/libnss3/changelog.Debian.gz.bak
sudo apt-get upgrade
sudo apt-get -f install
sudo rm /usr/share/doc/libnss3/changelog.Debian.gz.bak

If you encounter any error messages during the process, STOP.

user535733
  • 62,253
  • Tried the above commands, by executing (sudo apt-get upgrade) I started getting error: You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: libnss3 : Breaks: libnss3:i386 (!= 2:3.19.2-1ubuntu1) but 2:3.26.2-0ubuntu0.14.04.3 is installed libnss3:i386 : Breaks: libnss3 (!= 2:3.26.2-0ubuntu0.14.04.3) but 2:3.19.2-1ubuntu1 is installed libnss3-nssdb : Depends: libnss3 (= 2:3.26.2-0ubuntu0.14.04.3) but 2:3.19.2-1ubuntu1 is installed E: Unmet dependencies. Try using -f So I stopped as you instructed – Mark J Mar 15 '17 at 15:39
  • On a minor note, I've just edited the question and added a new error that I noticed being displayed in an icon next to time in status bar. – Mark J Mar 15 '17 at 15:51
  • Did you upgrade from 15.10 to 16.04? Those 'unmet dependency' errors look like 15.10 version conflicts. – user535733 Mar 15 '17 at 17:59