版本:release-1.4.13-stable,环境:centos64位
Libevent简介
- 同libev,libuv一样,三者都是异步事件库。作为库的使用者只需要注册事件的回调,库会检测事件的触发,然后根据事件的优先级以及先后顺序调用相应的回调函数。
编译与安装
./autogen.sh
./configure && make -j 4
- 编译时报错
../event_rpcgen.py ./regress.rpc || echo "No Python installed" ../event_rpcgen.py ./regress.rpc || echo "No Python installed" /usr/bin/env: ‘python’: Not a directory No Python installed /usr/bin/env: ‘python’: Not a directory No Python installed
- 解决:
apt-get install python2.7 root@iZbp13ejs2nz00912s6x58Z:~/code/libevent-release-1.4.13-stable# whereis python2 python2: /usr/bin/python2 /usr/share/man/man1/python2.1.gz root@iZbp13ejs2nz00912s6x58Z:~/code/libevent-release-1.4.13-stable# sudo ln -s /usr/bin/python2 /usr/bin/python
- make install