• 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/

  • 相关阅读:
    学习使用apt(三)
    2005 男人感悟100(转自MOP)
    学习使用apt
    学习使用apt(四)
    编译glib1.2.20r5出错./libtool: line 297
    poj1004的java实现
    猜算式
    基于爬山算法求解TSP问题(JAVA)
    mysql数据库的简单语句的介绍(1)
    NYOJ42 一笔画问题
  • 原文地址:https://www.cnblogs.com/SsoZhNO-1/p/6817287.html
Copyright © 2020-2023  润新知