Install lestencrypt on rasbian

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
./certbot-auto certonly --standalone --standalone-supported-challenges http-01 --email youremail@address -d yourdomain.duckdns.org

It produced this output:

Certbot has problem setting up the virtual environment.

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

My web server is (include version):

The operating system my web server runs on is (include version):

PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=raspbian
ID_LIKE=debian
HOME_URL=“http://www.raspbian.org/
SUPPORT_URL=“http://www.raspbian.org/RaspbianForums
BUG_REPORT_URL=“http://www.raspbian.org/RaspbianBugs

My hosting provider, if applicable, is: home asstant duckdns https cert

I can login to a root shell on my machine (yes or no, or I don’t know): YES

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): putty

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

I have the same error as in this topic Certbot has problem setting up the virtual environment
But I have no idea where i need to change this lines becouse in my letsencrypt i dont have somethink like this :confused: can someone help me?

Hi Wirux, welcome to the community!

Could you please provide the output of: ./certbot-auto --version?

The two-line change suggested here: Certbot has problem setting up the virtual environment, should also work for you. The changes are applied directly within ./certbot-auto.

As a check, please provide the output of: grep virtualenv ./certbot-auto.

1 Like

Output of ./certbot-auto --version?

Certbot has problem setting up the virtual environment.

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

The same like normal install

Output of grep virtualenv ./certbot-auto .

  # virtualenv binary can be found in different packages depending on
  virtualenv=
  if apt-cache show virtualenv > /dev/null 2>&1 ; then
    if ! LC_ALL=C apt-cache --quiet=0 show virtualenv 2>&1 | grep -q 'No packages found'; then
      virtualenv="virtualenv"
  if apt-cache show python-virtualenv > /dev/null 2>&1; then
    virtualenv="$virtualenv python-virtualenv"
    $virtualenv \
  if ! $EXISTS virtualenv > /dev/null ; then
    error Failed to install a working \"virtualenv\" command, exiting
  if ! $TOOL list *virtualenv >/dev/null 2>&1; then
      python-virtualenv
      python2-virtualenv
      python27-virtualenv
  # Fedora 29 must use python3-virtualenv
  if $TOOL list python3-virtualenv >/dev/null 2>&1; then
      python3-virtualenv
  # SLE12 don't have python-virtualenv
  if zypper search -x python-virtualenv >/dev/null 2>&1; then
    OPENSUSE_VIRTUALENV_PACKAGES="python-virtualenv"
    # Since Leap 15.0 (and associated Tumbleweed version), python-virtualenv
    # is a source package, and python2-virtualenv must be used instead.
    # Also currently python2-setuptools is not a dependency of python2-virtualenv,
    OPENSUSE_VIRTUALENV_PACKAGES="python2-virtualenv python2-setuptools"
  # "python-virtualenv" is Python3, but "python2-virtualenv" provides
  # only "virtualenv2" binary, not "virtualenv".
    python-virtualenv
    dev-python/virtualenv
    py27-virtualenv \
  if ! hash virtualenv 2>/dev/null; then
    say "virtualenv not installed."
    pip install virtualenv
  pkgin -y install 'gcc49' 'py27-augeas' 'py27-virtualenv'
      python-virtualenv
      error "If you would like to use the virtualenv way, please run the script again with the"
    error "You will need to install OS dependencies, configure virtualenv, and run pip install manually."
        # Use virtualenv binary
        command = ['virtualenv', '--no-site-packages', '--python', sys.executable, venv_path]

In 1001 line in the certbot-auto

It doesn’t do anything to get certbot running, but you could try a different client instead, one that doesn’t have as many dependencies. I use acme.sh quite a bit.

For minimal dependencies and very small footprint (approx 60k executable) you can try

This seems like a really weird state. At this point, you might want to make a backup of your certificates/configurations and try to uninstall certbot completely, then re-install.