3

Which package contains the C standard library?

6

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

1
  • 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. Nov 27 '10 at 8:33
2

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.

1
1

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.

3
  • 2
    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. 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. Nov 27 '10 at 8:39
  • Edited the answer accordingly. That's quite important sorry I missed it. :-) Nov 27 '10 at 9:10
1

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/libc6.so.6

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.