https://github.com/libevent/libevent.git
https://github.com/libevent/libevent/blob/master/Documentation/Building.md#building-on-unix-cmake
從github上下載libevent的源碼
./autogen.sh ./configure make
第一步autogen.sh的時候可能會提示下面的錯誤:
- aclocal: not found 安裝automake
- error: Libtool library used but 'LIBTOOL' is undefined 安裝libtool
- 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 安裝libssl-dev
在make過程中,需要openssl相關的東西,這個無法通過源安裝,只能下載源碼編譯
openssl安裝完成后,再 make ,然后 make install 就可以了