2010-05-17 109 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