Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
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
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.

share|improve this answer

Your Answer


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.