Problem while installing WiringPi

Hi,

i haven’t been using my Pi for 12 months. This weekend however, i decided to bring it to life again.
I first wanted to update my existing Raspbmc, but then i found out, that Raspbmc will be replaced by OSMC.
So i downloaded OSMC and installed it.
Now i want to install WiringPi again but I’m having some trouble.

I did the whole “sudo apt-get update / upgrade” thing and downloaded WiringPi via “git clone git://git.drogon.net/wiringPi”.
After changing directory to “wiringPi/” i tried “./build” but got the following error message:

root@osmc:~/wiringPi# ./build
wiringPi Build script

WiringPi Library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringSerial.c
[Compile] wiringShift.c
[Compile] piHiPri.c
[Compile] piThread.c
wiringPi.c:55:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
wiringSerial.c:23:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
compilation terminated.
piHiPri.c:27:19: fatal error: sched.h: No such file or directory
#include <sched.h>
^
compilation terminated.
In file included from wiringShift.c:25:0:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory

include_next <stdint.h>

                      ^

compilation terminated.
piThread.c:26:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
Makefile:89: recipe for target ‘wiringPi.o’ failed
make: *** [wiringPi.o] Error 1
make: *** Waiting for unfinished jobs…
Makefile:89: recipe for target ‘wiringSerial.o’ failed
make: *** [wiringSerial.o] Error 1
Makefile:89: recipe for target ‘wiringShift.o’ failed
make: *** [wiringShift.o] Error 1
Makefile:89: recipe for target ‘piHiPri.o’ failed
make: *** [piHiPri.o] Error 1
Makefile:89: recipe for target ‘piThread.o’ failed
make: *** [piThread.o] Error 1

Make Failed…
Please check the messages and fix any problems. If you’re still stuck,
then please email all the output and as many details as you can to
projects@drogon.net

I already searched Google but couldn’t find a solution for this problem.
Does anybody know how i can fix this?

Thanks

Ok, i just found the solution. The build essentials were missing;
“sudo apt-get install build-essential” fixed it :wink:

Thanks, 2 years later this save me big time.