1.先用:ls -al /usr/lib | grep libevent 查看是否已安装,如果已安装且版本低于1.3,则先通过:rpm -e libevent —nodeps 进行卸载。
安装:
# wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
# tar zxvf libevent-1.4.13-stable.tar.gz
#
cd
libevent-1.4.13-stable.tar.gz
# ./configure
–prefix=/usr
#
make
#
sudo make install //执行
make install 时需要 root 权限
5.测试libevent是否安装成功:ls
-al /usr/lib | grep libevent(或 ls -al /usr/local/lib | grep
libevent)
出现类似下图结果则表示安装成功:
例子编译:
gcc filename.c -o filename -levent
http://blog.linuxphp.org/archives/1482/
http://blog.chinaunix.net/uid-25885064-id-3399135.html
libevent install,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/douglasgame/p/3750264.html