我試圖運行在Ubuntu上14多克註冊表使用以下命令:GEVENT無效運行的泊塢註冊
sudo gunicorn --access-logfile - --debug -k gevent -b 0.0.0.0:5000 -w 1 docker_registry.wsgi:application
不幸的是,當我嘗試這個,我得到了以下故障消息:
Error: class uri 'gevent' invalid or not found:
[Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 139, in load_class
mod = import_module('.'.join(components))
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 24, in <module>
from gevent.server import StreamServer
File "/usr/local/lib/python2.7/dist-packages/gevent/server.py", line 6, in <module>
from gevent.socket import EWOULDBLOCK, socket
File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 659, in <module>
from gevent.ssl import sslwrap_simple as ssl, SSLError as sslerror, SSLSocket as SSLType
File "/usr/local/lib/python2.7/dist-packages/gevent/ssl.py", line 386, in <module>
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
NameError: name 'PROTOCOL_SSLv3' is not defined
我做了一些搜索和發現的東西,告訴我要安裝,以蟒蛇,GEVENT得到GEVENT:
sudo apt-get install python-gevent
我這樣做和dpkg的後續調用:
dpkg -l|grep python
顯示,蟒蛇,GEVENT安裝。
不幸的是,安裝沒有解決問題。我仍然收到相同的失敗消息,說gevent無效或找不到。
有誰知道如何解決這個問題?請指教...
這確實沒有回答這個問題。一旦你有足夠的[聲譽](http://stackoverflow.com/help/whats-reputation),你將能夠[評論任何職位](http://stackoverflow.com/help/privileges/comment);相反,[提供不需要提問者澄清的答案](http://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can- I-DO-代替)。 - [來自評論](/ review/low-quality-posts/11886221) –
@LaurIvan我認爲這是一個試圖回答這個問題的嘗試,但是如果RaviBhure提供了一些解釋爲什麼這會起作用,這將是有幫助的。 – gariepy