我下载12版本找不到configure可执行文件,但是11版本好使
整了挺久,记录一下
找到官网(https://libevent.org/)
找到复制链接
1.下载压缩包
wget https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.12-stable.tar.gz
2.解压
tar -zxvf libevent-2.1.11-stable.tar.gz
cd libevent-2.1.11-stable/
3.编译
./configure --prefix=/usr/local/libevent
make
sudo make install
4.打开bashrc
vi ~/.bashrc
5.在最末尾处配置环境变量
unset PKG_CONFIG_LIB
export PKG_CONFIG_PATH=/usr/local/libevent/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/local/libevent/lib:$LD_LIBRARY_PATH
6.使环境变量生效
source ~/.bashrc