I need to install a few third-party binary packages that are only available in the i386 architecture on 64-bit (amd64) Ubuntu. How do I add the new 32-bit repository so ia32-apt-get will automatically install and convert the i386-only binary packages and their dependencies?
Unfortunately you can't install an i386 package on an AMD64 machine; dpkg just won't let you. You can do a couple of things to get around this. Probably the easiest is to set up an i386 chroot using debootstrap:
# /usr/sbin/debootstrap --arch i386 jaunty /mnt/ubuntu http://archive.ubuntu.com/ubuntu
You can then chroot into /mnt/ubuntu and install your packages.
Have you run
ia32-apt-get temporarily sets the apt-get packages listing directory to
/etc/apt/foreign/ instead of its default,
/etc/apt. Upon install, your default
/etc/apt/sources.list is copied into
/etc/apt/foreign. So to get a list of packages to install, you'll need to run the update at least once. And if you want to extend the sources.list repo beyond what is available by default in your native sources.list, you'll need to edit that foreign sources.list.
You can't. Most likely there is a very specific reason why those packages aren't in the amd64 repository. If you don't see a reason why, then you can try building them yourself.
Go to the package page, download the source deb and build it yourself.
Get the needs files apt-get install devscripts build-essential fakeroot dpkg-dev
Lets say you want to build bc. Find the source package: http://packages.ubuntu.com/jaunty/bc The link to the dsc file in on the right. Then run: dget http://archive.ubuntu.com/ubuntu/pool/main/b/bc/bc_1.06.94-3ubuntu1.dsc cd bc-1.06.94/ dpkg-buildpackage -rfakeroot -b
And you'll have fresh deb files you can install with dpkg.