解决Goagent安装了pythong-gevent无法使用的问题

今天发现在ubuntu一直使用的Goagent上有一条这样的警告。

WARNING: python-gevent not installed. `curl -k -L http://git.io/I9B7RQ|sh`
GoAgent Version    : 2.1.4 (python/2.7.3 gevent/None pyopenssl/0.12)
Listen Address     : 127.0.0.1:8087
GAE Mode           : https
GAE Profile        : google_cn
GAE APPID          : *************



于是在终端下输入命令安装python-gevent

sudo apt-get install python-gevent



安装完成后,gogent居然不能用了,在终端下提示如下错误

$ sudo ./goagent-2.1.4/local/proxy.py
Traceback (most recent call last):
  File "./goagent-2.1.4/local/proxy.py", line 1459, in <module>
    class DNSServer(gevent.server.DatagramServer):
AttributeError: 'module' object has no attribute 'DatagramServer'
Exception KeyError: KeyError(140210045086000,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
hdq@decken:~$ sudo ./goagent-2.1.4/local/proxy.py
Traceback (most recent call last):
  File "./goagent-2.1.4/local/proxy.py", line 1459, in <module>
    class DNSServer(gevent.server.DatagramServer):
AttributeError: 'module' object has no attribute 'DatagramServer'
Exception KeyError: KeyError(140031035828528,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored


Google了一下,果断找到proxy.py的第1459行(我使用的的是2.1.1版,具体版本行数会有区别)的:

class DNSServer(gevent.server.DategramServer)

将其改成:

class DNSServer(gevent.server.StreamServer)


保存,重新运行Goagent,尽情遨游互联网吧!


你可能感兴趣的:(ubuntu,ubuntu,goagent,goagent,goagent)