Whenever I try to install anything with apt-get, I get error messages:
apt-get install abinit
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:
libpng12-0 : Breaks: libpng12-0:i386 (!= 1.2.54-1ubuntu1) but 1.2.54-1ubuntu1.1 is to be installed
libpng12-0:i386 : Breaks: libpng12-0 (!= 1.2.54-1ubuntu1.1) but 1.2.54-1ubuntu1 is to be installed
libpng12-dev : Depends: libpng12-0 (= 1.2.54-1ubuntu1.1) but 1.2.54-1ubuntu1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
How can I fix this? If I try the suggested apt-get -f install command, it complains:
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) over (1.2.54-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libpng12-0/changelog.Debian.gz', which is different from other instances of package libpng12-0:amd64
Processing triggers for libc-bin (2.23-0ubuntu11.2) ...
Errors were encountered while processing:
/var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
What would a smart person do?