x86_64にgeventインストールが失敗する:「未定義のシンボル:evhttp_accept_socket」
質問
インストールしようとしています Gevent 新鮮なEC2 CENTOS 5.3 64ビット システム。
Yumで利用可能なLibeventバージョンは、別のパッケージ(Beanstalkd)には古すぎたので、コンパイル/インストールしました libevent-1.4.13-stable
次のコマンドを手動で使用します。
./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
ローカルVirtualBoxインスタンス(32ビット)でまったく同じ手順をたどりましたが、エラーが表示されていません。
これを修正するにはどうすればよいですか?
解決
最も簡単な修正は、をクローンすることでした gitリポジトリ, 、に切り替えます wip-all
ブランチ、そして実行します python setup.py build_libevent build install
Geventに対して静的にLibeventをつかんで構築します:
# 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
詳しくは ここ.
所属していません StackOverflow