安装libevent
1.在libevent官网(http://libevent.org/)上下载压缩包(我下载的是libevent-2.1.8-stable.tar.gz)
2.解压压缩包:tar -zxvf libevent-2.1.8-stable.tzr.gz
3.进入新生成的目录中:cd libevent-2.1.8-stable
4.配置安装库的目标路径:./configure --prefix=/usr
报错:configure: error: openssl is a must but can not be found. You should add the directory containing ‘openssl.pc’ to the PKG_CONFIG_PATH’ environment variable, or set ‘CFLAGS’ and ‘LDFLAGS’ directly for openssl, or use ‘–disable-openssl’ to disable support for openssl encryption
运行:sudo apt install libssl-dev
5.编译安装libevent库:(1)make (2)sudo make install
6.检测安装是否成功:ls -al /usr/lib | grep libevent

浙公网安备 33010602011771号