How do I get the libc development libraries for Ubuntu 12.04?

Solution 1:

The build-essential Install build-essential package should sort you out.

sudo apt-get install build-essential

Solution 2:

If you just need the libc header files, install libc6-dev Install libc6-dev.

If you prefer to install on the command-line, you can use:

sudo apt-get update && sudo apt-get install libc6-dev

This is worth mentioning, as if you're using a compiler other than the version of GCC as provided by build-essential Install build-essential / gcc-defaults Install gcc-defaults, you may want to just install the libc6-dev package.

(Installing build-essential will work because it will cause libc6-dev to be installed. libc6-dev is what actually provides the header files that enable you to link against GNU libc.)