Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

On compiling a program using gcc, I was getting syntax errors in /sys/types.h. While investigating the problem, I ended up mixing up the /bits/types.h and /sys/types.h and I mistakenly deleted /sys/types.h as well created some problems in /sys/types.h

How do I fix this ?

Are they a part of the linux-headers package ?

I am using Ubuntu 12.04 x86 with Kernel 3.2.0-36-generic

share|improve this question
The correct package is probably libc6-dev. – jofel Feb 25 '13 at 10:48
up vote 1 down vote accepted

Find the package name with dpkg -S /path/to/types.h,

and re-install it with apt-get install --reinstall XXX

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.