zoukankan      html  css  js  c++  java
  • 安装gevent错误/gevent/core.so: undefined symbol: event_global_current_base_ 的解决方案

    在通过python setup.py install 安装gevent后,使用gevent时提示如下错误:
    # python2.6
    Python 2.6.7 (r267:88850, Sep  6 2011, 08:13:16)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gevent
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "build/bdist.linux-x86_64/egg/gevent/__init__.py", line 41, in <module>
      File "build/bdist.linux-x86_64/egg/gevent/core.py", line 7, in <module>
      File "build/bdist.linux-x86_64/egg/gevent/core.py", line 6, in __bootstrap__
    ImportError: /root/.python-eggs/gevent-0.13.6-py2.6-linux-x86_64.egg-tmp/gevent/core.so: undefined symbol: event_global_current_base_
    >>>
    undefined symbol: event_global_current_base_ 究竟是怎么回事?
    gevent依赖于libevent,而且gevent对libevent1.4支持不怎么地,怀疑是编译安装gevent时使用的是libevent1.X
    通过 ldd 查看究竟使用的是哪个libevent
    ldd /gevent-0.13.6/gevent/core.so

    如果机器上安装有多个libevent版本,则最好在编译安装gevent时指定libevent路径,
    例如:
    python2.6 setup.py build  --libevent /opt/uploadavml/libevent-2.0.17-stable
    python2.6 setup.py install

    强烈建议将gevent搭配libevent2.0.17及其以上版本使用,测试时发现gevent搭配libevent2.0.10是出问题的!!

  • 相关阅读:
    2017-3-7 leetcode 66 119 121
    2017-3-6 leetcode 118 169 189
    2017-3-5 leetcode 442 531 533
    c++ std
    2017-3-4 leetcode 414 485 495
    2017-3-3 leetcod 1 35 448
    想做手游
    编程规范
    1165: 零起点学算法72——首字母变大写
    1164: 零起点学算法71——C语言合法标识符(存在问题)
  • 原文地址:https://www.cnblogs.com/Jerryshome/p/2385164.html
Copyright © 2011-2022 走看看