I'm trying to install libsqlite3-dev for both i386 and amd64 on the same Ubuntu 12.04 machine. I'm developing an application that uses sqlite3, and want to compile and test both the 32-bit and 64-bit versions.

However it looks like the libsqlite3-dev:i386 package is incompatible with the libsqlite3-dev:amd64, as apt keeps wanting to remove one when I install the other.

Is there a way to get both installed on the same system?


You cannot install both of the -dev packages on the same system at the same time. You can only install one or the other, as they contain some of the same files. Multi-arch doesn't enable cross-compilation support, which is what you're trying to do. If you were to install the :i386 version of the sqlite development package, and build with the 64-bit compiler, you'll almost certainly have a broken build as a result.

Your best bet is to compile in a 32-bit chroot or VM, to build the 32-bit version.

  • The header files are indeed in both packages, but their contents is identical. Even more, for other -dev packages such as zlib1g which also have shared (and identical) files, it is possible to install both version simultaneously.
    – Wim
    Feb 13 '13 at 20:29
  • 1
    I just force-installed both packages, this didn't seem to break anything and I can now build (and run correctly) both versions. Is this just a case of the package maintainer declaring a conflict where there isn't really one?
    – Wim
    Feb 13 '13 at 20:36

Personally, I do not consider forced installations even as a last resort. I think, you might find pbuilder quite useful. Here's a HOWTO for that. You can even install different distros for that purpose, and script the building process for different targets at the same time.


So, you can even leave all the dev packages uninstalled. They get installed into that temporary chroot installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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