gpt4 book ai didi

linux - letsencrypt-auto 无法正确创建证书

转载 作者:太空宇宙 更新时间:2023-11-04 10:40:27 24 4
gpt4 key购买 nike

我正在遵循本指南:https://www.digitalocean.com/community/tutorials/how-to-set-up-let-s-encrypt-certificates-for-multiple-apache-virtual-hosts-on-ubuntu-14-04 .

我确实按照教程中所示提取了 git 存储库,当我运行命令 ./letsencrypt-auto --apache -d example.com -d www.example.com 时,其中example.com 是我的实际站点,它确实要求我提供联系人的电子邮件地址,但它没有弹出剩余的操作,而是弹出了以下错误消息:

发生意外错误:
NameError:在封闭范围内赋值之前引用了自由变量“addrs”

但它创建了证书。我尝试了网站 ssllabs,但它说服务器正在监听端口 443,但没有提供安全传输,https://example.com 也没有提供。实际工作(未加载)。

我尝试多次再次运行它,甚至重新拉取 git 存储库,但总是出现相同的错误消息。

日志文件的完整内容(表示错误的最后 38 行,用 $USER 替换了登录用户):

2016-02-11 16:59:24,530:DEBUG:letsencrypt.error_handler:Encountered exception:
Traceback (most recent call last):
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/client.py", line 355, in deploy_certificate
fullchain_path=fullchain_path)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 214, in deploy_cert
vhost = self.choose_vhost(domain)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 308, in choose_vhost
vhost = self.make_vhost_ssl(vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 733, in make_vhost_ssl
self._add_name_vhost_if_necessary(ssl_vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in _add_name_vhost_if_necessary
test_addr in test_vh.addrs) and
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in <genexpr>
test_addr in test_vh.addrs) and
NameError: free variable 'addrs' referenced before assignment in enclosing scope

2016-02-11 16:59:24,530:DEBUG:letsencrypt.error_handler:Calling registered functions
2016-02-11 16:59:24,534:DEBUG:letsencrypt.cli:Exiting abnormally:
Traceback (most recent call last):
File "/home/$USER/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module>
sys.exit(main())
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py", line 1987, in main
return config.func(config, plugins)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py", line 667, in run
lineage.chain, lineage.fullchain)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/client.py", line 355, in deploy_certificate
fullchain_path=fullchain_path)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 214, in deploy_cert
vhost = self.choose_vhost(domain)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 308, in choose_vhost
vhost = self.make_vhost_ssl(vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 733, in make_vhost_ssl
self._add_name_vhost_if_necessary(ssl_vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in _add_name_vhost_if_necessary
test_addr in test_vh.addrs) and
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in <genexpr>
test_addr in test_vh.addrs) and
NameError: free variable 'addrs' referenced before assignment in enclosing scope

这是什么问题,我该如何解决?

感谢阅读。

最佳答案

这里有一个关于此错误的已关闭问题,并且已进行修复:

https://github.com/letsencrypt/letsencrypt/issues/2470

我必须手动应用补丁。希望 0.4.1 发布时这不会成为问题。

关于linux - letsencrypt-auto 无法正确创建证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35373435/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com