我每个月从 cron 运行以下命令,并收到此错误:
/opt/letsencrypt/letsencrypt-auto certonly --quiet --standalone --renew-by-default -d example.org -d www.example.org
Creating virtual environment...
Installing Python packages...
Installation succeeded.
An unexpected error occurred:
DistributionNotFound: The 'ndg-httpsclient' distribution was not found and is required by requests
Please see the logfile 'certbot.log' for more details.
显然,“示例”不是我的领域,我使用了正确的领域。没有certbot.log
提供更多细节:
Traceback (most recent call last):
File "/root/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module>
sys.exit(main())
File "/opt/letsencrypt/certbot/main.py", line 858, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File "/opt/letsencrypt/certbot/plugins/disco.py", line 183, in find_all
plugin_ep = PluginEntryPoint(entry_point)
File "/opt/letsencrypt/certbot/plugins/disco.py", line 34, in __init__
self.plugin_cls = entry_point.load()
File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2201, in load
self.require(*args, **kwargs)
File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2218, in require
items = working_set.resolve(reqs, env, installer)
File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 830, in resolve
raise DistributionNotFound(req, requirers)
DistributionNotFound: The 'ndg-httpsclient' distribution was not found and is required by requests
我缺少什么?
答案1
您没有指定您的操作系统,但在我的 Ubuntu 18.04 机器上,安装 python-ndg-httpsclient 包解决了问题:
sudo apt-get install python-ndg-httpsclient
我意识到这个答案可能有点晚了。