After hanging long time with older Ubuntu (v.12) I'm updating to v.16 and am very confused with mentions of "gcc-multilib".

Is this actually Apple's "fat binaries" or "universal binaries" model ported to Linux?

That is, have native C libraries on Ubuntu become containers that pack several binaries for various architectures?

If so, we no longer have to specially install 32-bit runtime libs on a x64 system? The "default" package of gcc or g++ libraries contains all needed to run and build 32-bit apps?


gcc-multilib is useful for cross-compiling, that is, compiling a program to run on a different processor architecture. For example, you would need gcc-multilib if you are running on 64-bit Ubuntu and want to compile a program to run on 32-bit Ubuntu (or on ARM etc. you get the idea).

  • 1
    So, it is not related to runtime libraries? Do we still need to go thru the hoops and install "libc-i386", "g++-i386" and so on 32-bit libs to run 32-bit programs on x64? And is "dpkg --add-architecture i386" related to multilib ? – ddbug Dec 1 '16 at 23:28
  • Yes. The usual hoops. dpkg --add-architecture simply tells dpkg that you really want to install packages for foreign architecture and it should stop complaining and requesting --force-architecture. – AlexP Dec 1 '16 at 23:35
  • Thank you AlexP. Is this multilib setup new for Ubuntu 16, or it existed earlier, say in v.14 or even 12? – ddbug Dec 1 '16 at 23:45
  • 12.04 at least. – AlexP Dec 1 '16 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.