0

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?

3 Answers 3

2

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.

2
  • ia32-apt-get tries to put a wrapper on top of apt-get to automatically download and convert 32-bit packages to work on 64-bit Debian or Ubuntu. It adds a few sets of apt configuration to /etc/apt/foreign etc. but it is not obvious how to add another repository so everything will work together.
    – joeforker
    Jun 8, 2009 at 22:27
  • Mine complains about a corrupted .deb instead of just saying "wrong architecture".
    – joeforker
    Jun 9, 2009 at 17:25
2

Have you run ia32-apt-get update? 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.

1

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.

1
  • Unfortuately I don't have the source code to all the packages.
    – joeforker
    Jun 8, 2009 at 22:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .