3

I am building an application (in Python) on Amazon EC2 that has a following dependency chain:

gevent-websocket ---> gevent ---> libevent

The last one (libevent) got upgraded on Sunday and my server is now generating this error:

(...)
  File "/usr/lib/python2.6/site-packages/gevent-0.13.7-py2.6-linux-x86_64.egg/gevent/__init__.py", line 41, in <module>
    from gevent import core
ImportError: libevent-1.4.so.2: cannot open shared object file: No such file or directory

Not wanting to spend much time on the issue, I tried to mitigate it by creating a symlink to an always-recent version:

$ sudo ln -s /usr/lib64/libevent.so /usr/lib64/libevent-1.4.so.2

But it didn't quite work:

(...)
  File "/usr/lib/python2.6/site-packages/gevent-0.13.7-py2.6-linux-x86_64.egg/gevent/__init__.py", line 41, in <module>
    from gevent import core
ImportError: /usr/lib/python2.6/site-packages/gevent-0.13.7-py2.6-linux-x86_64.egg/gevent/core.so: undefined symbol: current_base

I am a bit stumped as to how to proceed. Should I create more symlinks? To what? Or is there a better way to solve this problem...

PS. For the record I am using Amazon AMI.

1 Answer 1

3

The libevent upgrade introduced a library ABI version bump (you'll probably find libevent-1.4.so.3). You can't just create a symlink because binaries built against the previous ABI won't work (hence the undefined symbol: current_base error). You need to rebuild gevent against the new library version. It looks like you installed it from an egg or source tarball, so remove the current module (delete /usr/lib/python2.6/site-packages/gevent-0.13.7-py2.6-linux-x86_64.egg) and install it again.

1
  • Thanks, that seems to have resolved the issue. I installed gevent using easy_install. I wish it had an option to just check for upgrades like other package managers do...
    – Dreen
    Oct 23, 2012 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .