Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There's a series of libs available in the Ubuntu repositories like lib32stdc++6 and lib32ncurses5. You can either install these on a 64 bit system, or go for installing libstdc++6:i386 and libncurses5:i386. I'm interested to learn what the difference is between the two types of packages.

What is the actual difference? Why are they both available? Being under the impression that libx:i386 is the new way of doing things, is this method always preferred over installing the lib32x variant? Having a couple of lib32x and a couple of libx:i386 libraries already installed also makes me wonder if it would be a good idea to switch to only one type of package by replacing them with there counterparts.

share|improve this question
Good question. Looks like duplicate packages in the repositories. The only reason I can find for having this is efficient support for both multi-arch enabled systems and requirements for some single-arch enabled systems. However, I think all Ubuntu versions are multi-arch now. By the way, for reference three package links: libstdc++6, lib64stdc++6, lib32stdc++6 – gertvdijk Jul 14 '13 at 13:53
up vote 2 down vote accepted

The practical difference between these packages is where the libraries are located. With libfoo:i386, libraries end up in multiarch paths such as /usr/lib/i386-linux-gnu whereas with lib32foo:amd64 libraries end up in the "old" paths such as /usr/lib32. In a distant future we would get rid of any lib32foo packages, but we are not there yet. At least lib32stdc++6 is needed for building gcc-X.Y at the moment, because it builds gcc-X.Y-multilib which is capable of supporting switches such as -m32 to select the target architecture (i.e. the architecture of the resulting binary). Without the lib32foo packages, the build-dependencies of gcc-X.Y would cross architecture boundaries and this is not yet supported. There are a few more issues that require keeping the lib32foo packages for a while.

share|improve this answer
If gcc-X.Y-multilib is an exception requiring a lib32foo package, what about 'general' 32bit applications? Do they care if a library is located in either /usr/lib/i386-linux-gnu or /usr/lib32? – Forage Jul 21 '13 at 16:41
Both paths are tried for libraries by binaries. To verify that look at /etc/ (and the corresponding directory). Multiarch paths take precedence over "old" paths, since the files are considered lexicographically. – Helmut Grohne Jul 21 '13 at 16:43

Your Answer


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.