11

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?

Robie Basak
  • 15,910
Wim
  • 213

2 Answers2

5

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.

dobey
  • 41,650
0

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.

http://ubuntuforums.org/showthread.php?t=206382

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