libevent的安装与遇到的问题

首先建议去下载libevent的压缩包。libevent-2.0.22-stable.tar。

放入Ubuntu解压

然后阅读READ.ME,得出:

1、./configure配置生成Makefile  

2、make  

3、make verify(option)(就是可选,可以不用这个命令)

4、sudo make install 

其中输入./configure命令时候,应该

./configure --prefix=/usr 

 

如果安装上述操作,一般可以直接成功。

不过本人使用的别的方法,中间遇到的问题与解决方法,与大家分享一下:

1、去GitHub找到源码。复制网址然后在Ubuntu中下载:git clone https://github.com/libevent/libevent

2、找不到./configure文件,重新阅读READ.ME发现:

To build libevent, type
$ ./configure && make
(If you got libevent from the git repository, you will
first need to run the included "autogen.sh" script in order to
generate the configure script.)

 

需要你先运行autogen.sh,这里又需要一个安装autoconf。

linux@ubuntu:~/share/libevent$ sudo apt-get install autoconf

3、./configure --prefix=/usr

发现错误:configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

这里我安装了shtool和libtool并输入命令autoreconf -f -i -Wall,no-obsolete

再次./configure --prefix=/usr

成功配置生成Makefile  

后面接着按照上面步骤,make --->make install

完成安装。

对于以上错误我参考了其他的博文,并不知所以然,只能把自己的摸索一步一步写出来,有什么问题希望大家指正相互学习!

另外附上问题二的参考网址:

http://www.linuxquestions.org/questions/debian-26/configure-error-cannot-find-install-sh-or-install-sh-in-364870/

 

posted @   SsoZh  阅读(1633)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
点击右上角即可分享
微信分享提示