2010-05-17 77 views
1

我试图在新鲜的EC2 CentOS 5.3上安装gevent64位系统。在x86_64上安装gevent失败:“undefined symbol:evhttp_accept_socket”

./configure --prefix=/usr && make && make install 

这是从安装GEVENT中输出:

[gevent-0.12.2]# python setup.py build --libevent /usr/lib 
Using libevent 1.4.13-stable: libevent.so 
running build 
running build_py 
running build_ext 
Linking /usr/src/gevent-0.12.2/build/lib.linux-x86_64-2.6/gevent/core.so to 
    /usr/src/gevent-0.12.2/gevent/core.so 
[gevent-0.12.2]# cd /path/to/my/project 
[project]# python myscript.py 
Traceback (most recent call last): 
    File "myscript.py", line 9, in <module> 
    from gevent.wsgi import WSGIServer as GeventServer 
    File "/usr/lib/python2.6/site-packages/gevent/__init__.py", line 32, in <module> 
    from gevent.core import reinit 
ImportError: /usr/lib/python2.6/site-packages/gevent/core.so: undefined symbol: evhttp_accept_socket 

由于荫可用libevent的版本是太旧另一包(beanstalkd)我编译/使用下面的命令手动安装libevent-1.4.13-stable

我已经在本地VirtualBox实例(32位)上完全遵循相同的步骤,我没有看到任何错误。

我该如何解决这个问题?

回答

3

最简单的解决是克隆git repository,切换到wip-all分支,并运行python setup.py build_libevent build install其抓住&静态建立的libevent针对GEVENT:

# git clone http://github.com/schmir/gevent.git 
# cd gevent 
# git branch -a 
* upstream 
    origin/HEAD 
    origin/close-socket-cancel-event 
    origin/pywsgi-without-basehttpserver 
    origin/upstream 
    origin/wip-all 
    origin/wip-setup-config 
# git checkout origin/wip-all 
# python setup.py build_libevent build install 

更多信息here