Renew batch on Debian Failing Due to PIP Errors

Hi,

i am trying to renew certs with batch. But i have this error :

Stopping nginx (via systemctl): nginx.service.
Bootstrapping dependencies for Debian-based OSes… (you can skip this with --no-bootstrap)
Atteint http://nginx.org jessie InRelease
Atteint http://packages.dotdeb.org jessie InRelease
Atteint http://nginx.org jessie/nginx Sources
Atteint http://packages.dotdeb.org jessie/all Sources
Atteint http://nginx.org jessie/nginx amd64 Packages
Atteint http://packages.dotdeb.org jessie/all amd64 Packages
Ign http://packages.dotdeb.org jessie/all Translation-fr_FR
Ign http://packages.dotdeb.org jessie/all Translation-fr
Ign http://packages.dotdeb.org jessie/all Translation-en
Ign http://nginx.org jessie/nginx Translation-fr_FR
Ign http://nginx.org jessie/nginx Translation-fr
Ign http://nginx.org jessie/nginx Translation-en
Atteint http://security.debian.org jessie/updates InRelease
Atteint http://security.debian.org jessie/updates/main Sources
Atteint http://security.debian.org jessie/updates/main amd64 Packages
Atteint http://security.debian.org jessie/updates/main Translation-en
Atteint http://debian.mirrors.ovh.net jessie-updates InRelease
Atteint http://debian.mirrors.ovh.net jessie-backports InRelease
Ign http://debian.mirrors.ovh.net jessie InRelease
Atteint http://debian.mirrors.ovh.net jessie Release.gpg
Atteint http://debian.mirrors.ovh.net jessie Release
Atteint http://debian.mirrors.ovh.net jessie-updates/main Sources
Réception de : 1 http://debian.mirrors.ovh.net jessie-updates/main amd64 Packages/DiffIndex [7 900 B]
Réception de : 2 http://debian.mirrors.ovh.net jessie-updates/main Translation-en/DiffIndex [2 704 B]
Réception de : 3 http://debian.mirrors.ovh.net jessie-backports/main Sources/DiffIndex [27,8 kB]
Réception de : 4 http://debian.mirrors.ovh.net jessie-backports/main amd64 Packages/DiffIndex [27,8 kB]
Réception de : 5 http://debian.mirrors.ovh.net jessie-backports/main Translation-en/DiffIndex [27,8 kB]
Atteint http://debian.mirrors.ovh.net jessie/main Sources
Atteint http://debian.mirrors.ovh.net jessie/contrib Sources
Atteint http://debian.mirrors.ovh.net jessie/non-free Sources
Atteint http://debian.mirrors.ovh.net jessie/main amd64 Packages
Atteint http://debian.mirrors.ovh.net jessie/contrib amd64 Packages
Atteint http://debian.mirrors.ovh.net jessie/non-free amd64 Packages
Atteint http://debian.mirrors.ovh.net jessie/contrib Translation-en
Atteint http://debian.mirrors.ovh.net jessie/main Translation-fr
Atteint http://debian.mirrors.ovh.net jessie/main Translation-en
Atteint http://debian.mirrors.ovh.net jessie/non-free Translation-en
94,0 ko réceptionnés en 37s (2 482 o/s)
Lecture des listes de paquets…
Lecture des listes de paquets…
Construction de l’arbre des dépendances…
Lecture des informations d’état…
libssl-dev est déjà la plus récente version disponible.
openssl est déjà la plus récente version disponible.
augeas-lenses est déjà la plus récente version disponible.
libaugeas0 est déjà la plus récente version disponible.
ca-certificates est déjà la plus récente version disponible.
gcc est déjà la plus récente version disponible.
libffi-dev est déjà la plus récente version disponible.
python est déjà la plus récente version disponible.
python-dev est déjà la plus récente version disponible.
python-virtualenv est déjà la plus récente version disponible.
virtualenv est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 36 non mis à jour.
Creating virtual environment…
Installing Python packages…
Had a problem while installing Python packages.

pip prints the following errors:

Collecting argparse==1.4.0 (from -r /tmp/tmp.ig5z1OO2ou/letsencrypt-auto-requirements.txt (line 11))
Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting pycparser==2.14 (from -r /tmp/tmp.ig5z1OO2ou/letsencrypt-auto-requirements.txt (line 17))
Downloading pycparser-2.14.tar.gz (223kB)
Collecting cffi==1.4.2 (from -r /tmp/tmp.ig5z1OO2ou/letsencrypt-auto-requirements.txt (line 21))
Downloading cffi-1.4.2.tar.gz (365kB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-oCG_rH/cffi/setup.py”, line 110, in
use_pkg_config()
File “/tmp/pip-build-oCG_rH/cffi/setup.py”, line 73, in use_pkg_config
_ask_pkg_config(include_dirs, ‘–cflags-only-I’, ‘-I’, sysroot=True)
File “/tmp/pip-build-oCG_rH/cffi/setup.py”, line 20, in _ask_pkg_config
stdout=subprocess.PIPE)
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 20] Not a directory

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-oCG_rH/cffi
You are using pip version 8.0.3, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

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/ .
Starting nginx (via systemctl): nginx.service.

Does anyone find a way to fix it ?

have you confirmed https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment is not your error?

of so

Please fill out the fields below so we can help you better.

My domain is:

I ran this command:

It produced this output:

My operating system is (include version):

My web server is (include version):

My hosting provider, if applicable, is:

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

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

Andrei

If i ran the command in putty it works fine.

Domain : all are concerned

Server : nginx version: nginx/1.11.13

OS version : debian 8.7

I am the root of the server :slight_smile:

Code :

# more /home/tools/renew_ssl.sh
#!/bin/sh

PATH=/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin/start-stop-daemon

/etc/init.d/nginx stop

/root/certbot-auto renew

/etc/init.d/nginx start

Maybe i must use bash instead of sh ?

hi @bosco

I ran this command:

quite an important bit of infromation which is stalling troubleshooting :smiley:

Andrei

My command is the code posted before, in a .sh file

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