Reputation: 13
I have 64bit ubuntu installed, and I am trying to compile a code with times.h however I keep getting sys/times.h No such file or directory
What I have tried so far
1. installing libc6-dev-i386, g++-multili, and libc6 and libc6-dev (Even though it is already installed)
2. I swapped <sys/times.h>
to </usr/include/sys/times.h>
and now I am getting features.h No such file or directory error
Question:
It is weird how it accepts </usr/include/sys/times.h>
instead of <sys/times.h>
, and help?
EDIT: I can access times.h, if it matters
Upvotes: 2
Views: 10061
Reputation: 124
I would recommend running:
$ locate /sys/time.h | grep include
Using the output you can determine what to do next:
If there is a file named /usr/include/<x86_64 or i386>-linux-gnu/sys/time.h
, then simply run: $ sudo ln -s /usr/include/<x86_64 or i386>-linux-gnu/sys /usr/include/sys
. This will direct the compiler to the right file if it checks . This seems to be what you are doing manually.
If there is no relevant output, then try downloading build-essential. It may be that something else is missing. $ sudo apt-get update; sudo apt-get install build-essential
Let me know if this helps!
Upvotes: 4