Go to ...

Techpository

A Better Technical Repository

RSS Feed

Linux: apt-get failing because of a broken package with an overwrite error


Problem:

apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following extra packages will be installed:
libnfc5
The following NEW packages will be installed:
libnfc5
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 77.2 kB of archives.
After this operation, 213 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://http.kali.org/kali/ kali/main libnfc5 i386 1.7.0-3kali1 [77.2 kB]
Fetched 77.2 kB in 0s (141 kB/s)
(Reading database … 289995 files and directories currently installed.)
Unpacking libnfc5:i386 (from …/libnfc5_1.7.0-3kali1_i386.deb) …
dpkg: error processing /var/cache/apt/archives/libnfc5_1.7.0-3kali1_i386.deb (–unpack):
trying to overwrite ‘/lib/udev/rules.d/42-pn53x.rules’, which is also in package libnfc3 1.6.0~svn1469-2kali1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libnfc5_1.7.0-3kali1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution:

dpkg -i –force-overwrite /var/cache/apt/archives/libnfc5_1.7.0-3kali1_i386.deb

apt-get -f install

 

 

Thank you D. Lartey for posting a similar solution which helped me resolve this one.