error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
yum install gd
After that whatever you are compliing should be happy.
loading, libraries, libgd, directoryerror, directory, install, gd, yum, compliing,