Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've got a 64-bit 12.10 install on my Laptop. When running apt-get update, it downloads package lists for 32-bit packages (as well as source and 64-bit package lists). Why does it look for 32-bit package lists on a 64-bit system? I've included one of the items it tries to find below.

http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages
share|improve this question
add comment

1 Answer 1

up vote 24 down vote accepted

Confusing, isn't it? Let me explain a bit.

Why?

  • 32-bit software runs fine on a 64-bit kernel with 64-bit capable hardware.
  • Some software still relies on specific 32-bit libraries. This is not nice, but sometimes we don't have the power to change this.
  • 32-bit software has to be available to the system to satisfy the dependencies, so it uses the 32-bit repositories as well.

I'm from early 2011. What happened?

In 64-bit versions of Ubuntu before 11.10, some set of common 32-bit libraries were packaged in a single ia32-libs package represented to APT/Dpkg as being 64-bit and in such a location in the repository. If you happen to need a single library for an application, it would depend on the 150+ MB of 32-bit libraries1. Clearly, this is not a nice design.

Multiple architectures?

The new idea was to introduce so-called "Multiarch" capabilities to APT/Dpkg and the tools around it. This was presented in several blueprints on Launchpad, here is one of them. Oneiric (11.10) became the first real schizophrenic architecture release.

How does it work?

You can tell Dpkg what architectures your system is capable running. On my 12.04 64-bit installation, this is here:

$ cat /etc/dpkg/dpkg.cfg.d/multiarch 
foreign-architecture i386

It opens the whole world of i386 packages, with amd64 still being the default:

$ apt-cache show libqt4-core                   | grep -E "^(Filename|Architecture)"
Architecture: amd64
Filename: pool/universe/q/qt4-x11/libqt4-core_4.8.1-0ubuntu4.3_amd64.deb

$ apt-cache show libqt4-core:i386              | grep -E "^(Filename|Architecture)"
Architecture: i386
Filename: pool/universe/q/qt4-x11/libqt4-core_4.8.1-0ubuntu4.3_i386.deb

The above example shows that Multiarch enables package maintainers to simply make their packages depend on libqt4-core:i386 for example, and makes it possible to install any 32-bit library/package (and thus to install any package that depends on any 32-bit library/package), rather than a preselected set.

ia32-libs compatibility

In case you were used to install the ia32-libs package as a convenience package to install a common set of basic 32-bit libraries, you can now use ia32-libs-multiarch Install ia32-libs-multiarch. This is a simple metapackage depending on the same (or at least very similar) set of libraries, but it will be installed with the power of Multiarch.

Further related readings

1 For Lucid (10.04) the ia32-libs package install size is 155,812.0 kB.

share|improve this answer
2  
I recommend running dpkg --print-foreign-architectures rather than catting /etc/dpkg/dpkg.cfg.d/multiarch. It doesn't exist after 12.04. –  tumbleweed Jan 9 '13 at 14:11
    
I've just setup apt-mirror at home and was hoping to just mirror the 64-bit repo. It's unfortunate that I cannot do that, but I understand why now and it makes sense this way. Answer accepted! –  tgm4883 Jan 9 '13 at 16:58
    
@tgm4883 You could remove the foreign architecture configuration if you really want to run amd64 only. It's similar to running an older Ubuntu without ia32-libs available. –  gertvdijk Jan 9 '13 at 17:00
    
I started reading and in my mind it said: hmm looks like a post from gertvdijk :+) Goede post ;) –  Rinzwind Jan 24 '13 at 14:00
    
Great answer indeed. –  Luis Alvarado Jan 27 '13 at 2:35
add comment

Your Answer

 
discard

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.