我有一个运行 Amazon Linux 第 2 版 (Karoo) 的 EC2 虚拟机 我怎样才能获得certbot
?
它附带awscli
安装的工具,这些工具似乎与certbot
in epel 不兼容:
$ sudo bash
# yum install -y epel-release
# yum-config-manager --enable epel
# yum install certbot certbot-dns-route53
# certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -d mysite.com
An unexpected error occurred:
ContextualVersionConflict: (botocore 1.13.36 (/usr/lib/python2.7/site-packages), Requirement.parse('botocore<1.6.0,>=1.5.0'), set(['boto3']))
Please see the logfile '/tmp/tmpVO1RPd/log' for more details.
此处简要讨论:https ://community.letsencrypt.org/t/contextualversionconflict-botocore-1-12-92/94922和此处:https ://unix.stackexchange.com/questions/415874/certbot-and- awscli-require-different-versions-of-botocore/456362#456362但这些修复对我不起作用(我想同时拥有 awscli)。
所以我尝试将它安装在 Python venv 中,这样我就可以拥有 certbot 和 awscli,但我得到了这个:
$ sudo bash
# yum install pip
# pip install virtualenv
# virtualenv env
# source env/bin/activate
# pip install certbot certbot-dns-route53
# certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -d mysite.com
Traceback (most recent call last):
File "/home/ec2-user/certbot-venv/env/bin/certbot", line 5, in <module>
from certbot.main import main
File "/home/ec2-user/certbot-venv/env/lib/python2.7/site-packages/certbot/main.py", line 2, in <module>
from certbot._internal import main as internal_main
File "/home/ec2-user/certbot-venv/env/lib/python2.7/site-packages/certbot/_internal/main.py", line 21, in <module>
from certbot._internal import cert_manager
File "/home/ec2-user/certbot-venv/env/lib/python2.7/site-packages/certbot/_internal/cert_manager.py", line 16, in <module>
from certbot._internal import storage
File "/home/ec2-user/certbot-venv/env/lib/python2.7/site-packages/certbot/_internal/storage.py", line 79, in <module>
def add_time_interval(base_time, interval, textparser=parsedatetime.Calendar()):
File "/home/ec2-user/certbot-venv/env/lib/python2.7/site-packages/parsedatetime/__init__.py", line 270, in __init__
self.ptc = Constants()
File "/home/ec2-user/certbot-venv/env/lib/python2.7/site-packages/parsedatetime/__init__.py", line 2381, in __init__
self.locale = get_icu(self.localeID)
File "/home/ec2-user/certbot-venv/env/lib/python2.7/site-packages/parsedatetime/pdt_locales/icu.py", line 56, in get_icu
result['icu'] = icu = pyicu.Locale(locale)
AttributeError: 'module' object has no attribute 'Locale'
有谁知道如何解决?我尝试安装一些与语言环境相关的不同东西,但还没有运气。