安装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

posted @   hellozhangjz  阅读(645)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示