Ubuntu – How to install both 32 and 64 bit versions of the same -dev package


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?

Best Answer

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.