
wget으로 설치한 certbot이 에러가 되었을 때의 대응
2022-10-03 last update
5 minutes reading CentOS AmazonLinux certbot python2.7전에 (1 년 전) EC2의 AmazonLinux에 wget을 통해 certbot을 설치하고 인증서를 설치했습니다.
이번에 다른 도메인에 대한 인증서를 얻으려고하면 다음 오류
음, 분명히
그래서
(이 때 무리 야리 pip 업데이트하고, 구성 부서졌다.하지만 그대로 방치하고 있다)
htps : // 혼자서 ty.ぇつぇ crypt. 오 rg / t / 레네 w - 에로 r의 - 모즈 - 핥기 dcryp와 g 라 phy - z 마 t-bin gs-open sl-bin g / 52395 / 9
시도해도 해결되지 않고 ...
오류 메시지를 자세히 살펴보면
보통 파이썬의 위치를 조사하지만
그래서 certbot이 참조하고 있는 python과 통상의 python과는 장소가 역시 다르다.
그래서 certbot이 사용하는 파이썬의 위치
그렇게 제대로 움직이게 되었다.
앞으로는 Amazon 공식 문서대로 하는 편이 좋을 것 같다.
htps : // / cs. 아 ws. 아마존. 이 m / 그럼 _ jp / 아 W 세 C2 / 아 st / 우세 r 구이 / s L - 온 - 안 - 인 s 단세. HTML
이번에 다른 도메인에 대한 인증서를 얻으려고하면 다음 오류
$ certbot-auto
Requesting to rerun /usr/bin/certbot-auto with root privileges...
Upgrading certbot-auto 0.22.2 to 0.25.1...
Replacing certbot-auto...
Creating virtual environment...
Installing Python packages...
Installation succeeded.
Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module>
from certbot.main import main
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py", line 10, in <module>
import josepy as jose
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/__init__.py", line 41, in <module>
from josepy.interfaces import JSONDeSerializable
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py", line 8, in <module>
from josepy import errors, util
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py", line 4, in <module>
import OpenSSL
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/rand.py", line 12, in <module>
from OpenSSL._util import (
File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
ImportError: No module named cryptography.hazmat.bindings.openssl.binding
음, 분명히
cryptography
패키지가없는 것 같습니다 ...그래서
pip
실행sudo pip install cryptography
하지만, 오류를 해결하지 않고 ...(이 때 무리 야리 pip 업데이트하고, 구성 부서졌다.하지만 그대로 방치하고 있다)
htps : // 혼자서 ty.ぇつぇ crypt. 오 rg / t / 레네 w - 에로 r의 - 모즈 - 핥기 dcryp와 g 라 phy - z 마 t-bin gs-open sl-bin g / 52395 / 9
시도해도 해결되지 않고 ...
오류 메시지를 자세히 살펴보면
/opt/eff.org/certbot/venv/local/lib/python2.7
위치를 참조합니다.보통 파이썬의 위치를 조사하지만
/usr/bin/python2.7
여기 있는 것 같다.그래서 certbot이 참조하고 있는 python과 통상의 python과는 장소가 역시 다르다.
그래서 certbot이 사용하는 파이썬의 위치
/opt/eff.org/certbot/venv/bin
여기에 python이나 pip라든지 있는 것 같다. 그래서 여기에서 pip 실행sudo /opt/eff.org/certbot/venv/bin/pip2.7 install cryptography
그리고 더 많은 오류$ sudo ./pip2.7 install cryptography
Requirement already satisfied: cryptography in /opt/eff.org/certbot/venv/lib64/python2.7/site-packages (2.2.2)
Requirement already satisfied: asn1crypto>=0.21.0 in /opt/eff.org/certbot/venv/lib/python2.7/dist-packages (from cryptography) (0.22.0)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /opt/eff.org/certbot/venv/lib64/python2.7/site-packages (from cryptography) (1.11.5)
Requirement already satisfied: enum34; python_version < "3" in /opt/eff.org/certbot/venv/lib/python2.7/dist-packages (from cryptography) (1.1.2)
Requirement already satisfied: six>=1.4.1 in /opt/eff.org/certbot/venv/lib/python2.7/dist-packages (from cryptography) (1.10.0)
Requirement already satisfied: idna>=2.1 in /opt/eff.org/certbot/venv/lib/python2.7/dist-packages (from cryptography) (2.5)
Requirement already satisfied: ipaddress; python_version < "3" in /opt/eff.org/certbot/venv/lib/python2.7/dist-packages (from cryptography) (1.0.16)
Requirement already satisfied: pycparser in /opt/eff.org/certbot/venv/lib/python2.7/dist-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography) (2.14)
zope-component 4.2.2 requires zope.interface>=4.1.0, which is not installed.
certbot 0.25.1 requires zope.interface, which is not installed.
certbot-apache 0.25.1 requires zope.interface, which is not installed.
certbot-nginx 0.25.1 requires zope.interface, which is not installed.
zope.interface
되는 것도 있는 것 같다. 그것도 설치하고 다시 certbot-auto
실행$ certbot-auto
Requesting to rerun /usr/bin/certbot-auto with root privileges...
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Which names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: ******************
2: ******************
3: ******************(マスクしてます)
-------------------------------------------------------------------------------
그렇게 제대로 움직이게 되었다.
앞으로는 Amazon 공식 문서대로 하는 편이 좋을 것 같다.
htps : // / cs. 아 ws. 아마존. 이 m / 그럼 _ jp / 아 W 세 C2 / 아 st / 우세 r 구이 / s L - 온 - 안 - 인 s 단세. HTML