CentOS下如何安装libevent

    技术2022-05-18  8

    1.下载安装包

    新版本是libevent-2.0.10-stable。(如果你的系统已经安装了libevent,可以不用安装)官网:http://www.monkey.org/~provos/libevent/下载:http://www.monkey.org/~provos/libevent-2.0.10-stable.tar.gz

    2.解压 # tar zxvf libevent-2.0.10-stable.tar.gz

    3.进入目录# cd libevent-2.0.10-stable

    4. 切换到root# su

    5.安装gcc# yum install gcc

    6.设置安装路径# ./configure –prefix=/usr

    7.编译# make

    8.安装# make install

    3.测试libevent是否安装成功:# ls -al /usr/lib | grep libeventlrwxrwxrwx 1 root root 21 11?? 12 17:38 libevent-1.2.so.1 -> libevent-1.2.so.1.0.3-rwxr-xr-x 1 root root 263546 11?? 12 17:38 libevent-1.2.so.1.0.3-rw-r–r– 1 root root 454156 11?? 12 17:38 libevent.a-rwxr-xr-x 1 root root 811 11?? 12 17:38 libevent.lalrwxrwxrwx 1 root root 21 11?? 12 17:38 libevent.so -> libevent-1.2.so.1.0.3还不错,都安装上了。


    最新回复(0)