Cant renew. certbot-auto not working on Debian Wheezy. Please help

My domain is: Oleg

I ran this command: ./certbot-auto

It produced this output:
Creating virtual environment…
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 2283, in
main()
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 938, in main
never_download=options.never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 643, in install_pip
filter_stdout=_filter_setup)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 976, in call_subprocess
cwd=cwd, env=env)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

My web server is (include version): nginx (+Apache2)

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

My hosting provider, if applicable, is: Own Server

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): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): i’down know. this command doesnt work with the same error

Hi @Spol

looks like you have a very old certbot-auto.

So install certbot-auto new:

Some additional information:

#lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.11 (wheezy)
Release: 7.11
Codename: wheezy


./certbot-auto renew --verbose

Bootstrapping dependencies for Debian-based OSes… (you can skip this with --no-bootstrap)
В кэше http://mirror.yandex.ru wheezy Release.gpg
В кэше http://mirror.yandex.ru wheezy-updates Release.gpg
В кэше http://mirror.yandex.ru wheezy Release
В кэше http://mirror.yandex.ru wheezy-updates Release
В кэше http://mirror.yandex.ru wheezy/main Sources
В кэше http://mirror.yandex.ru wheezy/main amd64 Packages
В кэше http://mirror.yandex.ru wheezy/main Translation-ru
В кэше http://mirror.yandex.ru wheezy/main Translation-en
В кэше http://mirror.yandex.ru wheezy-updates/main Sources
В кэше http://mirror.yandex.ru wheezy-updates/main amd64 Packages/DiffIndex
В кэше http://mirror.yandex.ru wheezy-updates/main Translation-en/DiffIndex
В кэше http://security.debian.org wheezy/updates Release.gpg
В кэше http://http.debian.net wheezy-backports Release.gpg
В кэше http://security.debian.org wheezy/updates Release
В кэше http://http.debian.net wheezy-backports Release
В кэше http://security.debian.org wheezy/updates/main Sources
В кэше http://security.debian.org wheezy/updates/main amd64 Packages
В кэше http://security.debian.org wheezy/updates/main Translation-en
В кэше http://http.debian.net wheezy-backports/main amd64 Packages/DiffIndex
В кэше http://http.debian.net wheezy-backports/main Translation-en/DiffIndex
Чтение списков пакетов… Готово
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия gcc.
Уже установлена самая новая версия python.
Уже установлена самая новая версия python-dev.
Уже установлена самая новая версия python-virtualenv.
Уже установлена самая новая версия ca-certificates.
Уже установлена самая новая версия libffi-dev.
Уже установлена самая новая версия libssl-dev.
Уже установлена самая новая версия openssl.
Уже установлена самая новая версия augeas-lenses.
Уже установлена самая новая версия libaugeas0.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 7 пакетов не обновлено.
Creating virtual environment…
Running virtualenv with interpreter /usr/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in /opt/eff.org/certbot/venv/bin/python2.7
Also creating executable in /opt/eff.org/certbot/venv/bin/python
Installing distribute…done.
Installing pip…
Error [Errno 2] No such file or directory while executing command /opt/eff.org/certbot/venv/bin/easy_install /usr/share/python-vi…p-1.1.debian1.tar.gz
…Installing pip…done.
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 2283, in
main()
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 938, in main
never_download=options.never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 643, in install_pip
filter_stdout=_filter_setup)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 976, in call_subprocess
cwd=cwd, env=env)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory


l# head -n1 $(which lsb_release)
#! /usr/bin/python

$(command -v python2.7 || command -v python27 || command -v python2 || command -v python) --version

Python 2.7.9

virtualenv --no-site-packages --python $(command -v python2.7 || command -v python27 || command -v python2 || command -v python) tmp_venv

Running virtualenv with interpreter /usr/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in tmp_venv/bin/python2.7
Also creating executable in tmp_venv/bin/python
Installing distribute…done.
Installing pip…
Error [Errno 2] No such file or directory while executing command /home/spol/tmp_venv/bin/easy_install /usr/share/python-vi…p-1.1.debian1.tar.gz
…Installing pip…done.
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 2283, in
main()
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 938, in main
never_download=options.never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 643, in install_pip
filter_stdout=_filter_setup)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 976, in call_subprocess
cwd=cwd, env=env)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

root@breeze:/home/spol# . ./tmp_venv/bin/activate
bash: ./tmp_venv/bin/activate: Нет такого файла или каталога (No such file or catalog)

root@breeze:/home/spol# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.11 (wheezy)
Release: 7.11
Codename: wheezy

The same error

wget https://dl.eff.org/certbot-auto

–2019-03-07 11:10:33-- https://dl.eff.org/certbot-auto

root@breeze:/home/spol/_new_certbot# chmod 755 certbot-auto
root@breeze:/home/spol/_new_certbot# ./certbot-auto renew
Bootstrapping dependencies for Debian-based OSes… (you can skip this with --no-bootstrap)
В кэше http://mirror.yandex.ru wheezy Release.gpg
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 7 пакетов не обновлено.
Upgrading certbot-auto 0.31.0 to 0.32.0…
Replacing certbot-auto…
Creating virtual environment…
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 2283, in
main()
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 938, in main
never_download=options.never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 643, in install_pip
filter_stdout=_filter_setup)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 976, in call_subprocess
cwd=cwd, env=env)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

root@breeze:/home/spol/_new_certbot# ./certbot-auto renew
Bootstrapping dependencies for Debian-based OSes… (you can skip this with --no-bootstrap)
Upgrading certbot-auto 0.31.0 to 0.32.0… Replacing certbot-auto…
Creating virtual environment…
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 2283, in
main()
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 938, in main
never_download=options.never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 643, in install_pip
filter_stdout=_filter_setup)
File “/usr/lib/python2.7/dist-packages/virtualenv.py”, line 976, in call_subprocess
cwd=cwd, env=env)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

tha same error with new certbot-auto

additional info:
#lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.11 (wheezy)
Release: 7.11
Codename: wheezy

$(command -v python2.7 || command -v python27 || command -v python2 || command -v python) --version

Python 2.7.9

head -n1 $(which lsb_release)

#! /usr/bin/python

certbot-auto is currently not working on Debian Wheezy.

One workaround is to run 0.31 with --no-self-upgrade, as suggested on the issue.

3 Likes

Hi,

When I tried to generate a certificate for a new domain certbot-auto started to upgrade from 0.30.2 to 0.32.0 but failed with this output:

Upgrading certbot-auto 0.30.2 to 0.32.0...
Replacing certbot-auto...
Creating virtual environment...
Installing Python packages...
/opt/eff.org/certbot/venv/bin/python: No module named pip.__main__; 'pip' is a package and cannot be directly executed
Traceback (most recent call last):
  File "/tmp/tmp.PScBmyRocA/pipstrap.py", line 177, in <module>
    sys.exit(main())
  File "/tmp/tmp.PScBmyRocA/pipstrap.py", line 149, in main
    pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
  File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/opt/eff.org/certbot/venv/bin/python', '-m', 'pip', '--version']' returned non-zero exit status 1

Trying to run any certbot-auto command results in it wanting to upgrade and fails. Using the --no-self-upgrade option results in failing to create a virtual environment (I assume because of the failed upgrade?):

Creating virtual environment...
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 3, in <module>
    virtualenv.main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 880, in main
    interpreter = resolve_interpreter(options.python)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1536, in resolve_interpreter
    if os.path.abspath(exe) != exe:
  File "/usr/lib/python2.7/posixpath.py", line 347, in abspath
    cwd = os.getcwd()
OSError: [Errno 2] No such file or directory

OS: ubuntu 12.04.5
python: 2.7.3-0ubuntu2.2
python-pip: 1.0-1build1

I know the server is old and needs to be migrated in the near future, but for now can anyone tell me how could I fix this problem so I can generate the certificate?

Hi @Emi94, I’ve moved your post into this thread, which is the identical issue.

Your OS is very old and is unsupported by Certbot.

You can try the workaround posted in the Github issue.

This works for me:

ln -fs /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py /usr/lib/python2.7/

wget https://raw.githubusercontent.com/certbot/certbot/75499277be6699fd5a9b884837546391950a3ec9/certbot-auto

chmod +x ./certbot-auto

certbot-auto renew --no-self-upgrade

it download some files and work fine.

Installing certbot-auto 0.31.0 as suggested in the github issue solved the problem.

Thanks.

1 Like

Debian Wheezy is so old that it’s not worth wasting any time on. Instead of spending time and effort on getting something to work with a completely obsolete version of Debian, just upgrade to the current stable release.
It’s kind of pointless trying to get https working on a system that is so old it no longer gets security updates. Debian stopped official support for security updates on Wheezy in the middle of 2018: https://www.debian.org/News/2018/20180601

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.