关于ubuntu-server:Ubuntu编译生成libevent库
下载libevent配置 2.1 ./configure --prefix=/usr/lib/libevent 报错如下 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 encryption2.2 解决办法: 须要配置环境变量PKG_CONFIG_PATH为openssl.pc的门路,Ubuntu曾经装了openssl,然而找不到openssl.pc,起因是没有装置 libssl-dev。 输出命令: sudo apt install -y libssl-dev 后装置后能够找到openssl.pc的门路:/usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc 2.3 配置环境变量PKG_CONFIG_PATH后,2.1的命令能够执行胜利 编译 1) make 2) sudo make install查看后果 ll /usr/lib/libevent