寻找一种让 certbot 在 Amazon Linux 2 上运行的方法

iew*_*guy 5 amazon-linux lets-encrypt certbot

亚马逊推出了一款名为“Amazon Linux 2”的新 Linux

当我尝试让 certbot 运行时......

 wget https://dl.eff.org/certbot-auto
 chmod a+x certbot-auto
 ./certbot-auto
Run Code Online (Sandbox Code Playgroud)

给出这个错误

Sorry, I don't know how to bootstrap Certbot on your operating system!

You will need to install OS dependencies, configure virtualenv, and run pip install manually.
Please see https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites for more info.
Run Code Online (Sandbox Code Playgroud)

然后我尝试:

yum install pip
yum install python-pip
pip install cryptography 
pip install certbot
yum install python-urllib3
yum install augeas
/usr/bin/certbot
Run Code Online (Sandbox Code Playgroud)

我收到这条消息

Traceback (most recent call last):
  File "/usr/bin/certbot", line 7, in <module>
    from certbot.main import main
  File "/usr/lib/python2.7/site-packages/certbot/main.py", line 19, in <module>
    from certbot import client
  File "/usr/lib/python2.7/site-packages/certbot/client.py", line 11, in <module>
    from acme import client as acme_client
  File "/usr/lib/python2.7/site-packages/acme/client.py", line 34, in <module>
    import urllib3.contrib.pyopenssl  # pylint: disable=import-error
  File "/usr/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 50, in <module>
    from ndg.httpsclient.ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT
ImportError: No module named ndg.httpsclient.ssl_peer_verification
Run Code Online (Sandbox Code Playgroud)

我不知道从这里去哪里。任何建议将不胜感激!

Dav*_*rks 15

我也遇到了这个问题,因为 Amazon Linux 2epel-release在它的存储库中没有,但我发现你可以安装 EPEL RPM 包本身,然后你就可以安装certbotcertbot-nginx从那里安装。

之后查看certbot 页面以获取配置详细信息。

  • 亚马逊现在有关于如何设置 epel 存储库和安装 certbot 的说明(与此大致相同):https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html #准备 (2认同)