大网数据广告活动
服务器运维问答

looking for a way to get certbot running on Amazon Linux 2

· 52CE 我爱测

Amazon has a new Linux out called "Amazon Linux 2" When I try and get certbot going.... wget https://dl.eff.org/certbot-auto chmod a+x certbot-auto ./certbot-auto gives this error Sorry, I don't know how to bootstrap Certbot on y…

问题原文

原帖链接 · iewebguy · CC BY-SA 3.0

Amazon has a new Linux out called "Amazon Linux 2"

When I try and get certbot going....

 wget https://dl.eff.org/certbot-auto
 chmod a+x certbot-auto
 ./certbot-auto

gives this error

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.

Then I tried:

yum install pip
yum install python-pip
pip install cryptography 
pip install certbot
yum install python-urllib3
yum install augeas
/usr/bin/certbot

And I get this message

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

I am not sure where to go from here. Any suggestions would be greatly appreciated!

已采纳解答

原帖链接 · David Birks · CC BY-SA 3.0

I was having trouble with this as well since Amazon Linux 2 doesn't have epel-release in its repositories, but I've found you can install the EPEL RPM package itself, and then you'll be able to install certbot or certbot-nginx from there.

  • Download the RPM

    curl -O http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
  • Then install it

    sudo yum install epel-release-latest-7.noarch.rpm
    
  • Now you can install certbot

    sudo yum install certbot
    
  • And then run it as usual

    sudo certbot
    

Check out the certbot page for configuration details after that.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-12-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。