Debian – apt-get upgrade failing on debianutils

aptdebian

Using apt-get dist-upgrade to upgrade software on a server, I get the following error:

Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 28575 files and directories currently installed.)
Preparing to replace debianutils 2.8.4 (using .../debianutils_2.30_i386.deb) ...
Unpacking replacement debianutils ...
dpkg: error processing /var/cache/apt/archives/debianutils_2.30_i386.deb (--unpack):
 trying to overwrite `/usr/sbin/add-shell', which is also in package passwd
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/debianutils_2.30_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I got a similar error some minutes prior with another package so I used apt-get remove to remove the package and then apt-get upgrade which seemed to get past that first little problem… Until it hit this next one. I can't use apt-get remove to remove debianutils as this is a core package and will break the system if removed.

Any pointers as to where to go from here?

Best Answer

The problem is that both debianutils and passwd both contain the same file (/usr/sbin/add-shell). I'm a little confused as to how you've got 2.8.4 installed, as it's not in any released version of Debian and was created in 2004. Are you trying to upgrade from a sarge box? You should be upgrading to etch, then lenny. Upgrading between more than one version is not supported.

This may end badly, but you can fix this by running:

# dpkg -i --force-overwrite /var/cache/apt/archives/debianutils_2.30_i386.deb

but you may end up with even more problems. I think you should reconsider why you're upgrading such an old version first.

Related Topic