0

I want to compile c file. I use g++ <filename> -o <output-filename>

Error: ch34x.c:13:24: fatal error: linux/init.h: Directory or file doesnt exist. (here is hash I cant type here)include <linux/init.h>

Thanks for answers :)

5
  • This looks like you are missing the linux/init.h module (which is highly unlikely) or that gcc does not know where to look for this module. I have found this file in my machine in this path: /usr/src/linux-headers-3.19.0-56/include/linux Apr 29, 2016 at 16:32
  • apt-file helps a lot to identify the packages that provide missing headers: apt-file search linux/init.h
    – mastov
    Apr 29, 2016 at 16:48
  • @mastov linux/init.h I have in PC.
    – Dortík
    Apr 29, 2016 at 17:14
  • use the command gcc g++ is for c++, gcc compiles c.
    – j0h
    Apr 29, 2016 at 18:00
  • @j0h Same error.
    – Dortík
    Apr 29, 2016 at 18:37

1 Answer 1

1

This looks like the thing you need.

Make sure you have linux-headers-generic installed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .