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

Which package contains the C standard library?

share|improve this question
up vote 6 down vote accepted

This should be available in the glibc package Download glibc Though most all the packages essential to development and code-building can be found in build-essential Download build-essential

share|improve this answer
build-essential is actually a dummy package, which has dependencies on "all you need to make a build". Very usefull, as you seldom know about all the libraries you'll actually need when building your applications from sources. But overkill if you only need the glibc. – Little Jawa Nov 27 '10 at 8:33

The package name is libc6, if you are trying to build a C app then you will want to install the build-essential package which brings the development packages.

share|improve this answer
I'll add that the source package's name in recent Ubuntu versions is eglibc as seen at…. – Daniel T Chen Nov 26 '10 at 20:54

It's libc6 / libc6-dev. For cross compilation for 64 bit / 32 bit systems, you can install libc6-amd64 libc6-dev-amd64 or *i386 repsectively.

The -dev packages are the ones that contain /usr/include/stdlib.h.

share|improve this answer
To clarify, although it isn't succinctly apparent from the package description, the host-native packages are libc6 & libc6-dev for either i386 or amd64. For cross-compilation, i386 uses libc6-*amd64, and amd64 uses libc6-*i386. – Daniel T Chen Nov 26 '10 at 21:01
Daniel is right: libc6-amd64 (and its 'dev' version) are usefull only for cross-compiling from i386. Whatever your platform, if you want to build for the same platform, you only need libc6/libc6-dev. – Little Jawa Nov 27 '10 at 8:39
Edited the answer accordingly. That's quite important sorry I missed it. :-) – Stefano Palazzo Nov 27 '10 at 9:10

In general, you can find which package a file belongs to using the command:

dpkg-query -S /path/to/file

In this case, this does depend on you first knowing which file is the C standard library: /lib/

share|improve this answer

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.