centos 7.3์์ nginx๋ฅผ ์ฌ์ฉํ๊ณ certbot --nginx
์คํํ ๋ ์ค๋ฅ๊ฐ ์์ต๋๋ค.
ImportError: No module named 'requests.packages.urllib3'
[root<strong i="9">@demo</strong> src]# certbot --nginx
Traceback (most recent call last):
File "/usr/bin/certbot", line 9, in <module>
load_entry_point('certbot==0.14.1', 'console_scripts', 'certbot')()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 564, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2662, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/site-packages/certbot/main.py", line 14, in <module>
from certbot import account
File "/usr/lib/python2.7/site-packages/certbot/account.py", line 17, in <module>
from acme import messages
File "/usr/lib/python2.7/site-packages/acme/messages.py", line 4, in <module>
from acme import challenges
File "/usr/lib/python2.7/site-packages/acme/challenges.py", line 10, in <module>
import requests
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in <module>
from .exceptions import InvalidURL
File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in <module>
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
File "/usr/lib/python2.7/site-packages/requests/packages/__init__.py", line 95, in load_module
raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'requests.packages.urllib3'
ํจํค์ง :
[root<strong i="13">@demo</strong> src]# pip list
acme (0.14.1)
backports.ssl-match-hostname (3.4.0.2)
certbot (0.14.1)
certifi (2017.7.27.1)
cffi (1.6.0)
chardet (3.0.4)
Cheetah (2.4.4)
cloud-init (0.7.6)
ConfigArgParse (0.11.0)
configobj (4.7.2)
cryptography (1.3.1)
decorator (3.4.0)
enum34 (1.0.4)
future (0.16.0)
idna (2.6)
iniparse (0.4)
ipaddress (1.0.16)
IPy (0.75)
Jinja2 (2.9.6)
jsonpatch (1.16)
jsonpointer (1.10)
kitchen (1.1.1)
Markdown (2.6.8)
MarkupSafe (1.0)
mock (1.0.1)
ndg-httpsclient (0.3.2)
oauth (1.0.1)
parsedatetime (1.5)
perf (0.1)
pip (9.0.1)
ply (3.4)
policycoreutils-default-encoding (0.1)
prettytable (0.7.2)
psutil (2.2.1)
pyasn1 (0.1.9)
pycparser (2.14)
pycurl (7.19.0)
pygobject (3.14.0)
pygpgme (0.3)
pyliblzma (0.5.3)
pyOpenSSL (0.13.1)
pyparsing (1.5.6)
pyRFC3339 (1.0)
python2-pythondialog (3.3.0)
pytz (2012d)
pyudev (0.15)
pyxattr (0.5.1)
PyYAML (3.12)
requests (2.18.4)
seobject (0.1)
sepolicy (1.1)
setuptools (36.2.7)
six (1.9.0)
slip (0.4.0)
slip.dbus (0.4.0)
urlgrabber (3.10)
urllib3 (1.22)
yum-axelget (1.0.4)
yum-metadata-parser (1.1.4)
zope.component (4.1.0)
zope.event (4.0.3)
zope.interface (4.0.5)
์ด๋ป๊ฒํด์ผํฉ๋๊น?
certbot์ ์ด๋ป๊ฒ ์ค์น ํ์ต๋๊น?
urllib3์ ์ค์นํ๋ pip๊ฐ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ๊ฐ๋ฅ์ฑ์ด ์์ง๋ง ๋ ์ฌ์ด ๋ฐฉ๋ฒ์ด์์ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด rpm์ผ๋ก ํจํค์งํ๋์ด ์์ผ๋ฉฐ centos์ ์ค์นํ๋ ๋ฐ ์ ํธ๋๋ ๋ฐฉ๋ฒ ์ผ ์ ์์ต๋๋ค. https://www.rpmfind.net/linux/rpm2html/search.php?query=python-urllib3
๊ทธ๋ฌ๋ ์ด๊ฒ์ ์์กด์ฑ์ผ๋ก ์ค์น ํ ๊ฒ์ด ์๋ค๋ ๊ฒ์ ๋๋์ต๋๋ค. ํจํค์ง ๊ด๋ฆฌ์์์ certbot์ ์ค์น ํ์ต๋๊น? ์ด ์ง์นจ์ ๋ฐ๋์ต๋๊น? https://certbot.eff.org/#centosrhel7 -nginx
@SwartzCr ์, https://certbot.eff.org/#centosrhel7 -nginx๋ฅผ ๋ฐ๋ผํ์ต๋๋ค.
# 4886์์ ์ธ๊ธํ๋ฏ์ด ์์ฒญ ๋ฒ์ ๊ณผ 6 ๊ฐ ๋ฒ์ ์ ์ ๋ฐ์ดํธ ํ ์ ์๋์? ๊ฐ์ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค. @erikrose ๋ centOS ๋๋ RHEL์ ์ ์คํธ๋ฆผ์ ์ ์ถํด์ผํ๋ ์ํฉ์ ๋๊น?
๊ทธ๋ ์ด๋ฏธ ์ต์ ๋ฒ์ ์ ์์ฒญ์ ๊ฐ์ง๊ณ ์๋ ๊ฒ ๊ฐ๊ณ , 6 ๊ฐ๊ฐ ์์ผ๋ฏ๋ก # 4884์ ๋ค๋ฅธ ์ํฉ์ ๋๋ค.
CentOS 7์์ urllib3 (1.22)๋ฅผ ์ป๋ ์ ์ผํ ๋ฐฉ๋ฒ์ pip install์ ์ฌ์ฉํ๋ ๊ฒ์
๋๋ค. epel์ด์๋ yum ๋ฒ์ ์ ๋งค์ฐ ์ค๋๋์์ต๋๋ค. python-urllib3.noarch 0 : 1.10.2-3.el7์ ์๋ชป๋ ๋ฒ์ ์ค๋ฅ๋ฅผ ์ ๋ฐํฉ๋๋ค. ๊ทธ๋ฌ๋ urllib3 v.1.22์ ํจ๊ป certbot-apache ๋ฅผ ์ค์น ํ ํ certbot --apache๋ฅผ ์คํํ ๋ ๋ค์๊ณผ ๊ฐ์ด ํ์๋ฉ๋๋ค.
ImportError: No module named 'requests.packages.urllib3'
์ต์ ํจํค์ง๊ฐ ๋ชจ๋ ์ค์น๋์ด ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
certbot (0.18.1)
certbot-apache (0.18.1)
certifi (2017.7.27.1)
pycurl (7.19.0)
requests (2.18.4)
six (1.11.0)
urlgrabber (3.10)
urllib3 (1.22)
์ต์ ์ ๋ณด. ์ด๊ฒ์ ๊ทธ๊ฒ์ ๊ณ ์น ๊ฒ ๊ฐ์ต๋๋ค ...
pip install requests urllib3 pyOpenSSL --force --upgrade
๊ทธ๋ฌ๋ certbot --apache๋ฅผ ์คํํ ๋
AttributeError: 'module' object has no attribute 'rand'
centos 7.3์ ์๋ก์ด ์ค์น์์ ๋์ผํ ๋ฌธ์ ๊ฐ ๋ํ๋ฉ๋๋ค. ๋ํ python2-certbot
์ค์น๋ฅผ ์๋ํ์ฌ @wardmundy ์ ๋์ผํ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค. certbot-2 --standalone
์ (๋ฅผ) ์คํํ๋ ค๊ณ ํ์ต๋๋ค.
์ด์ ๋ฒ์ ์ธ 0.14.0์ ์ค์นํ๋ ค๊ณ ํ๋๋ฐ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค. ๋๋ ์๋ ๊ฒฝ๋ก๋ฅผ ๋ฐ๋ผ ๋ด๋ ค ๊ฐ๊ณ ์๋ํ์ผ๋ฉฐ ์ฑ๊ณต์ ์ผ๋ก ์ธ์ฆ์๋ฅผ ๋ฐ์์ต๋๋ค.
@wardmundy ๋ฐ @akosveres rand ๋ฌธ์ ๋ https://github.com/certbot/certbot/commit/7f5f6471fea939c70294c2f31875d90320482861 ์์ ์์ ๋์์ต๋๋ค.
๋ฒ์ ๋ฒํธ 0.18.2์ ๋ฒ๊ทธ ์์ ๋ฆด๋ฆฌ์ค์์ ๊ณง ๋ฆด๋ฆฌ์ค ๋ ์์ ์
๋๋ค.
์ด๋ https://github.com/certbot/certbot/pull/5112#issuecomment -331046450์์ ๋
ผ์ ๋ ๊ฒ์ฒ๋ผ openssl์ด ์ผ์ ๋ณด๋ค ์์ rand๋ฅผ ์ง์ํ์ง ์๊ธฐ ๋๋ฌธ์ ๋ฐ์ํ์ต๋๋ค.
์ฌ๋๋ค์ด urllib3 ๋ฌธ์ ๊ฐ ๊ณ์ ๋ฐ์ํ๊ณ ์๋์?
์ค๋ Centos 7์ certbot์ ์ค์นํ๋ ค๊ณ ํ์ต๋๋ค. ๋๋ https://certbot.eff.org/#centosrhel7- ๋ค๋ฅธ ๋จ๊ณ๋ฅผ ๋ฐ๋ฆ
๋๋ค.
sudo certbot certonly
์คํํ๋ ค๊ณ ํ ๋ urllib3์ ์ฐพ์ ์ ์๋ค๊ณ ๋งํ์ต๋๋ค.
pip install requests urllib3 pyOpenSSL --upgrade
์คํ ํ
์ค๋ฅ ๋ฉ์์ง ๋ณ๊ฒฝ
ImportError : 'pyOpenSSL'๋ชจ๋์ ํ์ ๊ธฐ๋ฅ์ด ์์ต๋๋ค. v0.14 ์ด์์ผ๋ก ์
๊ทธ๋ ์ด๋ํ์ญ์์ค.
@DeronLee ์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์
์๋ก์ด ๊ฒ์ด ์์ต๋๊น?
@jcguevara ๋ง์นจ๋ด ๊ฐ์ฅ ์ข์ ๋ฐฉ๋ฒ์ ๋์ปค๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ ๋๋ค.
์ ์ด๋ ์ด๋ฌํ ๊ฒฝ์ฐ ์ค ์ผ๋ถ์์๋ ํจํค์ง๊ฐ pip
์ค์น๋ ์์๋ Python ํ๊ฒฝ์ด ์์ฌ๋๋ฉฐ ์ด์ ์ฒด์ ์์ ์ ๊ณตํ๋ ํจํค์ง ๋ฒ์ ์ ์ฌ์ ์ํฉ๋๋ค. ์ด๋ ๊ฒํ์ง ์๋ ๊ฒ์ด ์ข์ต๋๋ค.
์ด๋ฏธ์ด ์์น์์๋ ๊ฒฝ์ฐ ์์คํ ์์ ์ฐพ์ Python ํจํค์ง์ ์ต์ํ์ ์์กด๋๊ฐ์๋ certbot-auto ๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
@DeronLee ๊ทํ์ ์กฐ์ธ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค.
GitHub์์ ์ง์ ๋ค์ด๋ก๋ํ๊ณ @bmw๊ฐ ๊ถ์ฅํ๋๋๋ก ํด๊ฒฐ ํฉ๋๋ค.
@jcguevara ๊ฐ์ฌํฉ๋๋ค. ๋์ค์ ํด๋ณด๊ฒ ์ต๋๋ค.
cerbot-auto๋ ๋๋๊ฒ๋ ์๋ํฉ๋๋ค! ์ด ์์ ์ ์ํํ๋ ์ถ๊ฐ ๋๊ตฌ๊ฐ ๋ง์ ์ด์ ๋ ๋ฌด์์ ๋๊น? (หหห)
mac osx
+ Python2.7.13
openssl
๋ฒ์ ์ ํ์ธํด์ผํฉ๋๋ค.0.9.8zh 14 Jan 2016
์
๋๋ค.brew install openssl
๋ฅผ ์ฌ์ฉํ ๋ ํ์ฌ ๋ฒ์ ์ stable 1.0.2l
์
๋๋ค.brew install [email protected]
ํ๋ฉด์ด ๋ฒ์ ์ผ๋ก ์ธํด No Module Found Urllib3
๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.brew uninstall [email protected]
# openssl: stable 1.0.2l
brew install openssl
Urllib3
๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์์ ์ ์ ์์ต๋๋ค.์ด ๋ช
๋ น์ ์คํ ํ ํ
pip install requests urllib3 pyOpenSSL --force --upgrade
@DeronLee๊ฐ ๋งํ๋ฏ์ด :
์ค๋ฅ ๋ฉ์์ง ๋ณ๊ฒฝ
ImportError : 'pyOpenSSL'๋ชจ๋์ ํ์ ๊ธฐ๋ฅ์ด ์์ต๋๋ค. v0.14 ์ด์์ผ๋ก ์ ๊ทธ๋ ์ด๋ํ์ญ์์ค.
๋๋ pyOpenSSL ๋ฒ์ 16.2.0์ ์ค์นํ๊ณ ๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ์ผํ์ต๋๋ค.
pip install pyOpenSSL==16.2.0
๊ฐ์ฌ. ์ต์ ๋ฒ์ ์ ์ค์นํ๋ ค๊ณ ํ์ง๋ง ์๋ํ์ง ์์ต๋๋ค. ์๋ง๋ ๋
ํน๋ณ ๋ฒ์ ์ ์๋ํด์ผ
2017 ๋
11 ์ 11 ์ผ ์ค์ 1:04, "Nguyแป
n Thanh Tiแบฟn" [email protected]
์ผ๋ค :
์ด ๋ช ๋ น์ ์คํ ํ ํ
pip ์ค์น ์์ฒญ urllib3 pyOpenSSL --force --upgrade@DeronLee https://github.com/deronlee๊ฐ ๋งํ๋ฏ์ด :
์ค๋ฅ ๋ฉ์์ง ๋ณ๊ฒฝ
ImportError : 'pyOpenSSL'๋ชจ๋์ ํ์ ๊ธฐ๋ฅ์ด ์์ต๋๋ค. ์ํ
v0.14 ์ด์์ผ๋ก ์ ๊ทธ๋ ์ด๋ํฉ๋๋ค.๋๋ pyOpenSSL ๋ฒ์ 16.2.0์ ์ค์นํ๊ณ ๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ์ผํ์ต๋๋ค.
pip ์ค์น pyOpenSSL == 16.2.0โ
๋น์ ์ด ์ธ๊ธ ๋์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๊ณ ์์ต๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ณ GitHub์์ ํ์ธํ์ธ์.
https://github.com/certbot/certbot/issues/5104#issuecomment-343529478 ,
๋๋ ์ค๋ ๋ ์์๊ฑฐ
https://github.com/notifications/unsubscribe-auth/ALj8rHCKhYhwrgCEfvzwVaveagxIVMmtks5s1IIBgaJpZM4PUFnt
.
์๋
ํ์ธ์.
๊ฐ์ฌ. ์ต์ ๋ฒ์ ์ ์ค์นํ๋ ค๊ณ ํ์ง๋ง ์๋ํ์ง ์์ต๋๋ค. ์คํ์
๋ฒ์ ์ ์๋ ํด๋ณผ๊น
@DeronLee ๋น์ ์ ๋์๊ฒ ๋งํ ์ ์์ต๋๊น?
pip freeze
?@SwartzCr @DeronLee ์ ๋์ผํ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
๊ทธ๋์ ๋ช
๋ น์ ์คํํฉ๋๋ค
pip install requests urllib3 pyOpenSSL --force --upgrade
๋ค์๊ณผ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
ImportError: 'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer.
๊ทธ๋ฐ ๋ค์ @ thanhtien522๊ฐ ์ธ๊ธ ํ ๊ฒ์ ์๋ํ์ต๋๋ค.
pip install pyOpenSSL==16.2.0
ํ์ง๋ง ์ฌ์ ํ ์๋ํ์ง ์์ต๋๋ค. pyOpenSSL
์ด (๊ฐ) ๋๋ฝ๋์๋ค๋ ๋์ผํ ์ค๋ฅ๊ฐ ์ฌ์ ํ ๋ฐ์ํฉ๋๋ค.
PRETTY_NAME="CentOS Linux 7 (Core)"
certbot.noarch 0.19.0-1.el7 @epel
yum install certbot-nginx
๋ฅผ ์คํํ์ฌ Certbot ์ค์นpip freeze
์ ์ถ๋ ฅ์ ์๋์ ๊ฐ์ต๋๋ค.acme==0.19.0
asn1crypto==0.23.0
backports.ssl-match-hostname==3.4.0.2
certbot==0.19.0
certbot-nginx==0.19.0
certifi==2017.11.5
cffi==1.11.2
chardet==3.0.4
Cheetah==2.4.4
cloud-init==0.7.6
ConfigArgParse==0.11.0
configobj==4.7.2
cryptography==2.1.4
decorator==3.4.0
enum34==1.1.6
future==0.16.0
idna==2.6
iniparse==0.4
ipaddress==1.0.18
IPy==0.75
Jinja2==2.9.6
jsonpatch==1.16
jsonpointer==1.12
kitchen==1.1.1
Markdown==2.6.9
MarkupSafe==1.0
mock==1.0.1
ndg-httpsclient==0.3.2
oauth==1.0.1
parsedatetime==1.5
perf==0.1
ply==3.4
policycoreutils-default-encoding==0.1
prettytable==0.7.2
psutil==2.2.1
pyasn1==0.1.9
pycparser==2.18
pycurl==7.19.0
pygobject==3.22.0
pygpgme==0.3
pyliblzma==0.5.3
pyOpenSSL==16.2.0
pyparsing==1.5.6
pyRFC3339==1.0
python-linux-procfs==0.4.9
python2-pythondialog==3.3.0
pytz==2016.10
pyudev==0.15
pyxattr==0.5.1
PyYAML==3.12
requests==2.18.4
schedutils==0.4
seobject==0.1
sepolicy==1.1
six==1.11.0
slip==0.4.0
slip.dbus==0.4.0
urlgrabber==3.10
urllib3==1.22
yum-metadata-parser==1.1.4
zope.component==4.1.0
zope.event==4.0.3
zope.interface==4.0.5
๋ฌด์๋ณด๋ค๋ centos์์ certbot์ ์์กดํ๋ pyOpenSSL ๋ฒ์ ์ ๊ฐํํด์ผํ๋ ๊ฒ ๊ฐ์ต๋๋ค. ๋ค์์ ์๋ก ์ค์นํ ๋ ์ป๋ ๊ฒ์ ๋๋ค.
Dependencies Resolved
==================================================================================================
Package Arch Version Repository Size
==================================================================================================
Installing:
python2-certbot-nginx noarch 0.19.0-1.el7 epel 53 k
Installing for dependencies:
certbot noarch 0.19.0-1.el7 epel 20 k
dialog x86_64 1.2-4.20130523.el7 base 208 k
pyOpenSSL x86_64 0.13.1-3.el7 base 133 k
pyparsing noarch 1.5.6-9.el7 base 94 k
python-cffi x86_64 1.6.0-5.el7 base 218 k
python-enum34 noarch 1.0.4-1.el7 base 52 k
python-idna noarch 2.4-1.el7 base 94 k
python-ipaddress noarch 1.0.16-2.el7 base 34 k
python-ndg_httpsclient noarch 0.3.2-1.el7 epel 43 k
python-parsedatetime noarch 1.5-3.el7 epel 61 k
python-ply noarch 3.4-11.el7 base 123 k
python-pycparser noarch 2.14-1.el7 base 104 k
python-zope-component noarch 1:4.1.0-3.el7 epel 227 k
python-zope-event noarch 4.0.3-2.el7 epel 79 k
python-zope-interface x86_64 4.0.5-4.el7 base 138 k
python2-acme noarch 0.19.0-1.el7 epel 176 k
python2-certbot noarch 0.19.0-1.el7 epel 471 k
python2-configargparse noarch 0.11.0-1.el7 epel 30 k
python2-cryptography x86_64 1.7.2-1.el7_4.1 updates 502 k
python2-dialog noarch 3.3.0-6.el7 epel 94 k
python2-future noarch 0.16.0-2.el7 epel 799 k
python2-mock noarch 1.0.1-9.el7 epel 92 k
python2-psutil x86_64 2.2.1-3.el7 epel 116 k
python2-pyasn1 noarch 0.1.9-7.el7 base 100 k
python2-pyrfc3339 noarch 1.0-2.el7 epel 13 k
pytz noarch 2016.10-2.el7 base 46 k
0.14 ์ด์์ ๋ฒ์ ์ด์ด์ผํ๋ ๊ฒฝ์ฐ
๋๊ตฐ๊ฐ๊ฐ centos๋ฅผ ์ํด ๊ทธ๊ฒ์ ํฌ์ฅํด์ผํ๋ค๋ ๊ฒ์ ์๋ฏธ ํ ์ ์์ต๋๋ค- @bmw ๋ @hogarthj ์ ๋ํด ์ฐ๋ฝํด์ผ ํ ์ฌ๋์
๋๊น?
์, hogarthj๋ Red Hat / Fedora ํจํค์ง ๋ด๋น์์ด์ง๋ง ์ด๋ฉ์ผ์ ํตํด ๋ ์ ์ํ๊ฒ ์๋ตํฉ๋๋ค. ์ธ์ ๊ฐ ์ฌ๋ฌ๋ถ์ ์๊ฐํ๊ฒ๋์ด ๊ธฐ์ฉ๋๋ค.ํ์ง๋ง ์ฌ๊ธฐ์ ๊ทธ์์ชฝ์ ํ์ํ ๋ณ๊ฒฝ ์ฌํญ์ ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
CentOS 7์ ๊ฐ์ฅ ์ธ๊ธฐ์๋ ํ๋ซํผ ์ค ํ๋์ด๋ฉฐ CentOS 7์์ ๋ฌธ์ ์์ด ์ ๊ธฐ์ ์ผ๋ก ํ
์คํธํฉ๋๋ค. ์ด ์ค๋ ๋์ ๋๋ถ๋ถ์ ์ฌ๋๋ค์ 2.18.x ์์ฒญ์ด ์๋ค๊ณ ๋ณด๊ณ ํฉ๋๋ค. ์์ฒญ 2.6.0์ CentOS 7 ๋ฆฌํฌ์งํ ๋ฆฌ์ ํฌํจ๋์ด ์์ต๋๋ค. OS์ Python ํจํค์ง์ pip
๋ฅผ ํผํฉํ๋ฉด ๋์ ์๊ฐ์ ๋ณด๋ผ ์ ์์ต๋๋ค.
์ด ๋ฌธ์ ๊ฐ์๋ CentOS 7 ์ฌ์ฉ์๋ pip
ํตํด ์ํ ๋ Python ํจํค์ง์ ๋ณ๊ฒฝ ์ฌํญ์ ์ทจ์ํ๊ฑฐ๋ ์์คํ
์ ์ค์น๋ Python ํจํค์ง์ ์์กดํ์ง ์๊ณ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ certbot-auto ๋ฅผ ์ฌ์ฉํ์ฌ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์ต๋๋ค. .
์ด ์ง์นจ์ ๋ฐ๋์ต๋๋ค (๋ด ๋ฒ์ ์ urllib3๋ ์๋ํ์ง ์์). ๊ทธ๋ฌ๋ฉด certbot์ด ์คํ๋ ์ ์์ต๋๋ค.
๋๋ ์ด๊ฒ๋ค์ด ๋ ์ ์ ๋ช ๋ น์ผ๋ก ์ถ์ ๋ ์ ์๋ค๊ณ ํ์ ํฉ๋๋ค ...
pip ์ ๊ฑฐ ์์ฒญ
pip ์ ๊ฑฐ urllib3
yum ์ ๊ฑฐ python-urllib3
๋ ์ ๊ฑฐ ํ์ด์ฌ ์์ฒญ
yum ์ค์น python-urllib3
yum ์ค์น ํ์ด์ฌ ์์ฒญ
yum certbot ์ค์น
๋๋ ๊ทธ๊ฒ์ ์๋ํ๊ณ ,์ด ๋ช ๋ น์ ์ฌ์ฉํ๊ณ , ์๋ํฉ๋๋ค!
pip uninstall requests
pip uninstall urllib3
yum remove python-urllib3
yum remove python-requests
yum install python-urllib3
yum install python-requests
yum install certbot
yum install docker-compose
yum์ ์ฌ์ฉํ ํ์ ๋์ค์ pip๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๊น?
@sreezree certbot ์ด ์ค์นํ๋ ํจํค์ง์ ์ถฉ๋ํ๋ฏ๋ก pip๋ฅผ ์ฌ์ฉํ์ฌ certbot ๊ด๋ จ ํจํค์ง๋ฅผ ์ค์นํด์๋ ์๋ฉ๋๋ค.
์์์ ์ธ๊ธ ํ ๋ฐฉ๋ฒ ์ค ์ด๋ ๊ฒ๋ ๋๋ฅผ ์ํด ์๋ํ์ง ์์ผ๋ฉฐ ์ค๋ฅ ๋ฉ์์ง๋ ๋์ผํ๊ฒ ์ ์ง๋ฉ๋๋ค. ImportError: No module named 'requests.packages.urllib3'
CentOS 7.4์์ ๋์ผํ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
ImportError : 'requests.packages.urllib3'์ด๋ผ๋ ๋ชจ๋์ด ์์ต๋๋ค.
smalenfant์ ์ ์ ๋ ์๋ฃจ์
์ ์๋ํ์ต๋๋ค. ์๋ฆ๋ต๊ฒ ์๋ํฉ๋๋ค.
๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
certbot์ ์ค์นํ ๋ ์ค๋ฅ๊ฐ ์์์ ๋ฐ๊ฒฌํ์ต๋๋ค.
Installing : pytz-2016.10-2.el7.noarch 12/55
Installing : python2-parsedatetime-2.4-5.el7.noarch 13/55
Installing : python-urllib3-1.10.2-5.el7.noarch 14/55
Error unpacking rpm package python-urllib3-1.10.2-5.el7.noarch
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname: cpio: rename
Installing : libsemanage-python-2.5-11.el7.x86_64 15/55
error: python-urllib3-1.10.2-5.el7.noarch: install failed
Installing : python-ndg_httpsclient-0.3.2-1.el7.noarch 16/55
Installing : python2-six-1.9.0-0.el7.noarch 17/55
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname: cpio: rename
error: python-urllib3-1.10.2-5.el7.noarch: install failed
๋ค์ ์ค์นํ๋ ค๊ณ ํ๋ฉด ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
# yum install python-urllib3
Error unpacking rpm package python-urllib3-1.10.2-5.el7.noarch
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname: cpio: rename
Verifying : python-urllib3-1.10.2-5.el7.noarch 1/1
Failed:
python-urllib3.noarch 0:1.10.2-5.el7
Complete!
์คํจํ์ง๋ง ๋ง์ง๋ง ์ผ Complete!
, ์ด๋ป๊ฒ Complete!
?
๊ทธ๋์ ๋๋ tianchao ์น๊ตฌ๋ค์ด pip ๋ฒ์ ๊ณผ ์ถฉ๋ํ๋ค๊ณ ๋งํ์ต๋๋ค.
https://blog.csdn.net/u013614281/article/details/76832818
๊ทธ๋ฆฌ๊ณ ๋๋ pip ๋ฒ์ ์ ์ ๊ฑฐํ๊ณ yum ๋ฒ์ ์ ์ค์นํฉ๋๋ค.
pip uninstall urllib3
yum install python-urllib3
๊ทธ ํ ๋ค๋ฅธ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค
pkg_resources.DistributionNotFound: The 'urllib3<1.23,>=1.21.1' distribution was not found and is required by requests
๊ทธ๋์ ๋ญ์ผ, ๋ ์ธ๊ณ ์์ด ๐ญ
๊ทธ ์๋ ํ
pip uninstall requests
yum remove python-requests
yum install python-requests
yum install certbot
๊ทธ๋ฆฌ๊ณ ๊ทธ๊ฒ์ ์๋ํฉ๋๋ค .....
๊ทธ๋์ ์์ฒญ ๋ฒ์ ์ด urllib3๊ณผ ์ผ์นํ์ง ์๋๋ค๊ณ ์๊ฐํฉ๋๋ค.
๊ทธ๋์ ๊ทธ๊ฒ์ ๋ค๋ฅธ ๋์ผํ ํ๊ฒฝ ๊ธฐ๊ณ์์ ์๋ํ์ต๋๋ค
๋จผ์ ์์ฒญ ๋ฐ urllib3 ์ ๊ฑฐ
pip uninstall requests
pip uninstall urllib3
yum remove python-urllib3
yum remove python-requests
certbot ์ค์น
๊ด์ฐฎ์
์ด ์ค๋ฅ๋ ์ค์ ๋ก ๋ด๋ถ Python ์์ฒญ ์ฝ๋์์ ์คํจํ try..catch๋ก ์ธํด ์ธ์๋ฉ๋๋ค.
try:
import urllib3
except:
import requests.packages.urllib3
์ด ๋ฌธ์ ๋ urllib3์ ์ฐพ์ ์ ์์ง๋ง ์ด๋ค ์ด์ ๋ก ๋ urllib3์๋ก๋ ํ ์์๋ ๊ฒฝ์ฐ์๋ ๋ฐ์ํฉ๋๋ค.
์ด์ cerbot์ ์ ๊ฑฐํ ๋ค์ pip๋ฅผ ํตํด ์ค์น๋ฅผ ์๋ ํ ์ ์์ต๋๋ค. ์๋ํฉ๋๋ค.
sudo pip install certbot
๋๋ ๊ทธ๊ฒ์ ์๋ํ๊ณ ,์ด ๋ช ๋ น์ ์ฌ์ฉํ๊ณ , ์๋ํฉ๋๋ค!
pip uninstall requests pip uninstall urllib3 yum remove python-urllib3 yum remove python-requests yum install python-urllib3 yum install python-requests yum install certbot yum install docker-compose
์ข์์, ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค!
์ด ๋ฌธ์ ๊ฐ์๋ certbot-auto ์คํฌ๋ฆฝํธ๋ก ์ค์นํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
๋ช ํํํ๊ธฐ ์ํด RHEL 7 ๊ธฐ๋ฐ ์์คํ ์์
์ด ์ค๋ ๋์ ๋ฌธ์ ๋ ์ผ๋ฐ์ ์ผ๋ก pip
์์ ์ค์น๋ ํจํค์ง์ yum
์์ ์ค์น๋ ํจํค์ง๋ก ์ธํด Python ์ค์น๊ฐ ์ค๋จ๋์ด ๋ฐ์ํฉ๋๋ค. pip
ํตํด ์ค์น ํ ํจํค์ง๋ฅผ ์ ๊ฑฐํ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋ฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ต์ ์ ๋ณด. ์ด๊ฒ์ ๊ทธ๊ฒ์ ๊ณ ์น ๊ฒ ๊ฐ์ต๋๋ค ...
pip install requests urllib3 pyOpenSSL --force --upgrade