zoukankan      html  css  js  c++  java
  • 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/

  • 相关阅读:
    d3-tree 双向树
    .gitignore
    url正则匹配
    this 指向
    git 用法小总结
    心态崩了?
    内存溢出和内存泄漏的区别
    jQuery添加方法
    物理像素与逻辑像素
    服务器返回的status
  • 原文地址:https://www.cnblogs.com/SsoZhNO-1/p/6817287.html
Copyright © 2011-2022 走看看