gd.h no such file or directory
These errors came up while trying to install all vnstat programs (including vnstati).
[root@lwd1 vnstat-1.11]# make all
make -C src all
make[1]: Entering directory `vnstat-1.11/src'
gcc -O2 -c -o vnstati.o vnstati.c
In file included from vnstati.c:23:
vnstati.h:5:47: error: gd.h: No such file or directory
vnstati.h:6:45: error: gdfontt.h: No such file or directory
vnstati.h:7:46: error: gdfonts.h: No such file or directory
vnstati.h:8:51: error: gdfontmb.h: No such file or directory
vnstati.h:9:46: error: gdfontl.h: No such file or directory
vnstati.h:10:46: error: gdfontg.h: No such file or directory
In file included from vnstati.c:23:
vnstati.h:19: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âimâ
vnstati.c: In function âmainâ:
vnstati.c:342: error: âimâ undeclared (first use in this function)
vnstati.c:342: error: (Each undeclared identifier is reported only once
vnstati.c:342: error: for each function it appears in.)
make[1]: *** [vnstati.o] Error 1
make[1]: Leaving directory `vnstat-1.11/src'
make: *** [all] Error 2
If you get this, you should first check that you have gcc compiler installed try "gcc" command to see if you get "command not found" in ssh. Next we installed gd-devel.x86_64 with yum
yum install gd-devel.x86_64
This fixed the problem in our case, OS was CentOS 6.2