APT unmet dependencies for libgdm3
Debian rolled libgdbm3 version 1.8.3-12+b1 to testing and i was facing an error about unmet depencies.
[21:08:52]root@claw-t430:claw# LANG=C apt-get upgrade 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: libgdbm-dev : Depends: libgdbm3 (= 1.8.3-12+b1) but 1.8.3-12 is installed libgdbm3 : Breaks: libgdbm3:i386 (!= 1.8.3-12) but 1.8.3-12+b1 is installed libgdbm3:i386 : Breaks: libgdbm3 (!= 1.8.3-12+b1) but 1.8.3-12 is installed E: Unmet dependencies. Try using -f. [21:08:54]root@claw-t430:claw# LANG=C apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: g++-4.8 giblib1 libblas3gf libcolord1 libcolorhug1 libgnutls28 libgnutls28:i386 libmarblewidget17 libnfs1 libokularcore3 libppl12 libpython3.3 libpython3.3-minimal libpython3.3-stdlib luatex nepomuk-core-runtime python-colorama python-distlib python-pip python-requests python-urllib3 python3.3 python3.3-minimal shared-desktop-ontologies Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libgdbm3 The following packages will be upgraded: libgdbm3 1 upgraded, 0 newly installed, 0 to remove and 27 not upgraded. 3 not fully installed or removed. Need to get 0 B/44.1 kB of archives. After this operation, 4096 B disk space will be freed. Do you want to continue? [Y/n] Reading changelogs... Done Reading database ... 366576 files and directories currently installed.) Preparing to unpack .../libgdbm3_1.8.3-12+b1_amd64.deb ... Unpacking libgdbm3:amd64 (1.8.3-12+b1) over (1.8.3-12) ... dpkg: error processing archive /var/cache/apt/archives/libgdbm3_1.8.3-12+b1_amd64.deb (--unpack): trying to overwrite shared '/usr/share/doc/libgdbm3/changelog.Debian.gz', which is different from other instances of package libgdbm3:amd64 Processing triggers for install-info (5.2.0.dfsg.1-4) ... Errors were encountered while processing: /var/cache/apt/archives/libgdbm3_1.8.3-12+b1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
The problem was easy to solve and i was pointed to it by this line
trying to overwrite shared '/usr/share/doc/libgdbm3/changelog.Debian.gz', which is different from other instances of package libgdbm3:amd64
I just remove the changelog file and everything worked well. A trivial file causes a not so trivial problem here.