error event.h: No such file or directory

While compiling a package say, Greensql you may end up with the “event.h: No such file or directory”  error message as follows:

# make
g++ -g -Wno-deprecated -Wall -I/usr/local/include/ 
-c -o main.o main.cpp
main.cpp:23:19: error: event.h: No such file or directory

It indicates that the required ‘libevent’ package is missing from the server. You have to install the libevent and libevent-devel package either using YUM or from a RPM.

# yum install libevent libevent-devel

OR install the RPMs:

# rpm -ivh ftp://ftp.muug.mb.ca/mirror/centos/5.7/os/x86_64/\
CentOS/libevent-1.4.13-1.x86_64.rpm
# rpm -ivh ftp://ftp.muug.mb.ca/mirror/centos/5.7/os/x86_64/\
CentOS/libevent-devel-1.4.13-1.x86_64.rpm

(download the i386 version if you have a 32bit machine)

This entry was posted on Monday, December 19th, 2011 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.