skip to Main Content

When I run sudo certbot on terminal

Get following error

  [root@ip-111-111-111-111 home]# sudo certbot
  Traceback (most recent call last):
  File "/bin/certbot", line 9, in <module>
    load_entry_point('certbot==1.0.0', 'console_scripts', 'certbot')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/certbot/main.py", line 2, in <module>
    from certbot._internal import main as internal_main
  File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 20, in <module>
    from certbot._internal import client
  File "/usr/lib/python2.7/site-packages/certbot/_internal/client.py", line 14, in <module>
    from acme import client as acme_client
  File "/usr/lib/python2.7/site-packages/acme/client.py", line 37, in <module>
    requests.packages.urllib3.contrib.pyopenssl.inject_into_urllib3()  # type: ignore
  File "/usr/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 118, in inject_into_urllib3
    _validate_dependencies_met()
  File "/usr/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 153, in _validate_dependencies_met
    raise ImportError("'pyOpenSSL' module missing required functionality. "
ImportError: 'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer.

3

Answers


  1. In the error, you can find one of the solutions to the error:

    ImportError: 'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer.
    

    Try upgrade the package with the following command:

    $ pip install "pyOpenSSL>=0.14"
    ...
    
    Login or Signup to reply.
  2. Certbot is packaged in an extra repository called Extra Packages for Enterprise Linux (EPEL). To enable this repository on CentOS 7, run the following yum command:

    $ sudo yum --enablerepo=extras install epel-release
    

    Afterward, the certbot package can be installed with yum:

    $ sudo yum install certbot
    

    You may confirm your install was successful by calling the certbot command:

    $ certbot --version
    

    Output:

    certbot 0.31.0
    
    Login or Signup to reply.
  3. Install it from EPEL.

    yum install epel-release
    yum install certbot
    

    pip may sometimes not work because of python versions.
    Consider certbot a system-wise software.

    When I want to install via pip, I’d always use virtualenv.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search