Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 <ubuntu-devel-discuss@lists.ubuntu.com>
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 <qjb@debian.org>

Fixing the typo solves the problem.

share|improve this question
    
BTW, what is :i386 and :k386 next to package name? –  Dziamid Apr 30 '12 at 21:21

3 Answers 3

up vote 3 down vote accepted
+50

Usually, I remove the offending package first, and try to reinstall the packages afterwards. More than likely, you have some other repos enabled that provides the same packages and that leads to a conflict.

If this doesn't work, and you're SURE that this is coming from the base repositories you can force it (--force-yes). However, this should only be done if you're sure that the package you need won't compromise the integrity of your system.

share|improve this answer
    
It's libtiff4 (image file format library). A ton of software depend on it. I can not simply remove and install it. –  Dziamid Apr 30 '12 at 21:16
    
Have you tried apt-get upgrade libtiff4 (by itself)? I would double-check that your repository matches your current Ubuntu version (e.g. lsb_release -a) and compare that to /etc/apt/sources.list –  papashou Apr 30 '12 at 21:33
sudo dpkg -r --force-all <package-name>

sudo apt-get install <package-name>
share|improve this answer
1  
can you elaborate how this would help? –  DrSAR Apr 12 '13 at 6:49

I think you're right about that version of the package having a typo, :k386 for i386. It's fixed now in the current version.

I had a somewhat different problem getting libtiff4:i386 to install. I had to re-install libtiff4, then it worked. (during an upgrade from 10.04 to 12.04).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.