怎样编译安装libevent

2016年7月27日 | 分类: 【技术】

【介绍】

官网:http://libevent.org

参考:http://www.linuxfromscratch.org/blfs/view/svn/basicnet/libevent.html

【安装】

下载:https://github.com/libevent/libevent

最高版本:libevent-2.1.8

wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz && tar -zxvf libevent-2.1.8-stable.tar.gz && cd libevent-2.1.8-stable && ./configure --prefix=/usr --disable-static && make && make install

输出:

...
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib
...
 /usr/bin/mkdir -p '/usr/include/event2'
...

更新系统动态连接库配置:

echo /usr/lib >> /etc/ld.so.conf && ldconfig

安装完成。

相关文件路径:

LIBEVENT_OPENSSL_LIBS="-L/usr/lib -levent_openssl -levent"