Dear Maintainer,
I attempted to install a package but apt reported it was in a broken state, it suggested "--fix-broken install"
# apt --fix-broken install
...
Continue? [Y/n]
Get:1 http://deb.debian.org/debian testing/main amd64 libopenmpi40 amd64 5.0.10-1 [2,018 kB]
Fetched 2,018 kB in 0s (5,938 kB/s)
Reading changelogs... Done
Extracting templates from packages: 100%
(Reading database… 641841 files and directories currently installed.)
Preparing to unpack …/libopenmpi40_5.0.10-1_amd64.deb…
Unpacking libopenmpi40:amd64 (5.0.10-1)…
dpkg: error processing archive /var/cache/apt/archives/libopenmpi40_5.0.10-1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libmpi.so.40', which is also in package libopenmpi3t64:amd64 (4.1.6-13.3)
Errors were encountered while processing:
/var/cache/apt/archives/libopenmpi40_5.0.10-1_amd64.deb
Error: Sub-process /usr/bin/dpkg returned an error code (1)
#
I can see that package libopenmpi3t64 is not currently in testing so I don't know how the system came to have it installed, but the problem is that it and libopenmpi40 both provide /usr/lib/x86_64-linux-gnu/libmpi.so.40 and there is no relevant Replaces or Breaks section.
I fixed it with:
# dpkg --unpack --force-overwrite /var/cache/apt/archives/libopenmpi40_5.0.10-1_amd64.deb
and hope this hasn't broken anything else.
I set the status to important as without manually fixing the package I was unable to install or upgrade any other packages.
Even if I did something wrong to arrive at this situation, I don't think two packages should be providing the same file without there being a relationship between them?