Day: September 11, 2011

dpkg error: trying to overwrite X, which is also in package Y

While installing arm-elf-toolchain I was receiving this error message:

Unpacking u-boot-modified (from .../u-boot-modified_1.2.0-0bsprak4~natty_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/u-boot-modified_1.2.0-0bsprak4~natty_i386.deb (--unpack):
 trying to overwrite '/usr/bin/mkimage', which is also in package u-boot-tools 2010.12-2
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I solved this issue just executing:

$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/u-boot-modified_1.2.0-0bsprak4~natty_i386.deb