相关文章推荐
健壮的核桃  ·  apply lambda if else ...·  1 年前    · 
淡定的匕首  ·  ssh-keygen ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

That's probably because the header is named sys/time.h . Singular time , and not plural times . StoryTeller - Unslander Monica Mar 17, 2017 at 21:57 What are the permissions on that file? If the compiler can't open it for reading, it cannot include it. StoryTeller - Unslander Monica Mar 17, 2017 at 22:00
  • 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!

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .