Problem with Certbot on Raspbian

Discussion in 'Installation/Configuration' started by Milly, Apr 8, 2020.

  1. Milly

    Milly Member

    Hello
    I apologize for asking the following, but I haven't found a solution for a few days.
    I am doing some tests on Raspberry Pi, only one domain and two emails.

    - Raspbian Buster Lite
    - Raspberry Pi 4 4GB
    - The Perfect Server Debian Apache
    - 11 Install Let's Encrypt

    Code:
    cd /usr/local/bin
    wget https://dl.eff.org/certbot-auto
    chmod a+x certbot-auto
    ./certbot-auto --install-only
    I receive the following errors, but I really don't know how to solve them:
    root@mail:~# /usr/local/bin/certbot-auto --install-only
    Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
    Hit:1 http://archive.raspberrypi.org/debian buster InRelease
    Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
    Reading package lists... Done
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    ca-certificates is already the newest version (20190110).
    gcc is already the newest version (4:8.3.0-1+rpi2).
    gcc set to manually installed.
    python is already the newest version (2.7.16-1).
    openssl is already the newest version (1.1.1d-0+deb10u2+rpt1).
    The following additional packages will be installed:
    libexpat1-dev libpython-dev libpython2-dev libpython2.7-dev python-pip-whl
    python-pkg-resources python2-dev python2.7-dev python3-distutils python3-lib2to3
    python3-virtualenv
    Suggested packages:
    augeas-doc augeas-tools libssl-doc python-setuptools
    The following NEW packages will be installed:
    augeas-lenses libaugeas0 libexpat1-dev libffi-dev libpython-dev libpython2-dev
    libpython2.7-dev libssl-dev python-dev python-pip-whl python-pkg-resources
    python-virtualenv python2-dev python2.7-dev python3-distutils python3-lib2to3
    python3-virtualenv virtualenv
    0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
    Need to get 543 kB/35.9 MB of archives.
    After this operation, 60.5 MB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://raspbian.raspberrypi.org/raspbian buster/main armhf python2-dev armhf 2.7.16-1 [1,216 B]
    Get:2 http://raspbian.raspberrypi.org/raspbian buster/main armhf python-dev armhf 2.7.16-1 [1,192 B]
    Get:3 http://mirrors.switch.ca/raspbian/raspbian buster/main armhf python-pkg-resources all 40.8.0-1 [182 kB]
    Get:4 http://raspbian.freemirror.org/raspbian buster/main armhf python-virtualenv all 15.1.0+ds-2 [61.5 kB]
    Get:5 http://mirrors.switch.ca/raspbian/raspbian buster/main armhf python3-lib2to3 all 3.7.3-1 [76.7 kB]
    Get:6 http://mirrors.switch.ca/raspbian/raspbian buster/main armhf python3-distutils all 3.7.3-1 [142 kB]
    Get:7 http://raspbian.freemirror.org/raspbian buster/main armhf python3-virtualenv all 15.1.0+ds-2 [58.1 kB]
    Get:8 http://raspbian.freemirror.org/raspbian buster/main armhf virtualenv all 15.1.0+ds-2 [20.1 kB]
    Fetched 543 kB in 4s (135 kB/s)
    Selecting previously unselected package augeas-lenses.
    (Reading database ... 53996 files and directories currently installed.)
    Preparing to unpack .../00-augeas-lenses_1.11.0-3_all.deb ...
    Unpacking augeas-lenses (1.11.0-3) ...
    Selecting previously unselected package libaugeas0:armhf.
    Preparing to unpack .../01-libaugeas0_1.11.0-3_armhf.deb ...
    Setting up libaugeas0:armhf (1.11.0-3) ....................................................etc

    Creating virtual environment...
    Installing Python packages...
    Had a problem while installing Python packages.

    pip prints the following errors:

    =====================================================
    Collecting ConfigArgParse==1.0 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 12))
    Downloading https://files.pythonhosted.org/pack...b09ee19169c3427e0d3/ConfigArgParse-1.0.tar.gz (40kB)
    Collecting certifi==2019.11.28 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 14))
    Downloading https://files.pythonhosted.org/pack...d9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
    Collecting cffi==1.13.2 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 17))
    Downloading https://files.pythonhosted.org/pack...985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz (460kB)
    Collecting chardet==3.0.4 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 51))
    Downloading https://files.pythonhosted.org/pack...14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    Collecting configobj==5.0.6 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 54))
    Downloading https://files.pythonhosted.org/pack...64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz
    Collecting cryptography==2.8 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 56))
    Downloading https://files.pythonhosted.org/pack...ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz (504kB)
    Collecting distro==1.4.0 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 78))
    Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine('No status line received - the server has closed the connection',))': /simple/distro/
    Downloading https://files.pythonhosted.org/pack...ecba33e712e/distro-1.4.0-py2.py3-none-any.whl
    Downloading https://files.pythonhosted.org/pack...6ba8/certbot_nginx-1.3.0-py2.py3-none-any.whl (45kB)
    Requirement already satisfied: setuptools>=1.0 in /opt/eff.org/certbot/venv/lib/python2.7/site-packages (from josepy==1.2.0->-r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 95))
    THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    pycparser==2.19 from https://www.piwheels.org/simple/pyc...526dbbc7a0bd33d80d8af44231c37f58d73f56ff9cab6 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 113)):
    Expected sha256 a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3
    Got bc15573b7c6edd24407526dbbc7a0bd33d80d8af44231c37f58d73f56ff9cab6

    zope.component==4.6 from https://www.piwheels.org/simple/zop...8341edce929eba6bb2404662d1878f1b289af46f6f6a5 (from -r /tmp/tmp.mD75mHpS3S/letsencrypt-auto-requirements.txt (line 135)):
    Expected sha256 ec2afc5bbe611dcace98bb39822c122d44743d635dafc7315b9aef25097db9e6
    Got 74f55521dec189c08d98341edce929eba6bb2404662d1878f1b289af46f6f6a5
    =====================================================

    Certbot has problem setting up the virtual environment.

    We were not be able to guess the right solution from your pip
    output.

    Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
    for possible solutions.
    You may also find some support resources at https://certbot.eff.org/support/
    .

    I understand that the architecture and operating system is different, but will there be a solution?

    Even with the error I have continued with the installation, everything works, I send and receive emails, but by checking the options in ISPconfig:
    SSL:
    Let's Encrypt SSL:


    They are not marked and it does not work.
    Thank you

     
  2. Steini86

    Steini86 Active Member

    certbot seems to be installed, the problem is with python. Have you done an "apt update" before installation?
    You could try to get rid of all that certbot things and install amce.sh
    (If you have the most recent ispconfig version, there should be no need to install it, if certbot can't be found it will install acme.sh automatically)
     
    Milly likes this.
  3. Milly

    Milly Member

    At the moment it works by installing with:

    apt-get install python-certbot-apache

    Thanks for the help
     
    Last edited: Apr 9, 2020

Share This Page