I can't say what steps brought me into this:
→ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: error processing libtiff4 (--configure): libtiff4:i386 3.9.5-1ubuntu1.1 cannot be configured because libtiff4:k386 is in a different version (3.9.5-1ubuntu1) Errors were encountered while processing: libtiff4 E: Sub-process /usr/bin/dpkg returned an error code (1)
The following commands all end up in the same error:
sudo apt-get install -f sudo dpkg --configure -a sudo apt-get --fix-broken install sudo apt-get --fix-missing install sudo apt-get clean sudo apt-get autoclean sudo apt-get autoremove
How to solve these kind of problems? And what did I do wrong?
UPDATE I managed to get apt working again by downgrading to previous version (3.9.5-1ubuntu1). However, next upgrade led to the same problem. But there is more info now:
(Reading database ... dpkg: warning: files list file for package `libtiff4:k386' missing, assuming package has no files currently installed. (Reading database ... 281166 files and directories currently installed.) Preparing to replace libtiff4 3.9.5-1ubuntu1 (using .../libtiff4_3.9.5-1ubuntu1.1_i386.deb) ... Unpacking replacement libtiff4 ... dpkg: error processing libtiff4 (--configure): libtiff4:i386 3.9.5-1ubuntu1.1 cannot be configured because libtiff4:k386 is in a different version (3.9.5-1ubuntu1) No apport report written because MaxReports is reached already Errors were encountered while processing: libtiff4
So the real problem seems to be the missing
libtiff4:k386 package. And
k386 seems like a stupid typo somewhere.
I tracked down the file that introduces the typo:
**/var/lib/dpkg/status** Package: libtiff4 Status: install ok half-configured Multi-Arch: same Priority: optional Section: libs Installed-Size: 528 Maintainer: Ubuntu Developers <firstname.lastname@example.org> Architecture: k386 Source: tiff Version: 3.9.5-1ubuntu1 Config-Version: 3.9.5-1ubuntu1 Depends: libc6 (>= 2.11), libjpeg62 (>= 6b1), zlib1g (>= 1:1.1.4) Pre-Depends: multiarch-support Description: Tag Image File Format (TIFF) library libtiff is a library providing support for the Tag Image File Format (TIFF), a widely used format for storing image data. This package includes the shared library. Homepage: http://libtiff.maptools.org Original-Maintainer: Jay Berkenbilt <email@example.com>
Fixing the typo solves the problem.