Renew batch on Debian Failing Due to PIP Errors



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 jessie InRelease
Atteint jessie InRelease
Atteint jessie/nginx Sources
Atteint jessie/all Sources
Atteint jessie/nginx amd64 Packages
Atteint jessie/all amd64 Packages
Ign jessie/all Translation-fr_FR
Ign jessie/all Translation-fr
Ign jessie/all Translation-en
Ign jessie/nginx Translation-fr_FR
Ign jessie/nginx Translation-fr
Ign jessie/nginx Translation-en
Atteint jessie/updates InRelease
Atteint jessie/updates/main Sources
Atteint jessie/updates/main amd64 Packages
Atteint jessie/updates/main Translation-en
Atteint jessie-updates InRelease
Atteint jessie-backports InRelease
Ign jessie InRelease
Atteint jessie Release.gpg
Atteint jessie Release
Atteint jessie-updates/main Sources
Réception de : 1 jessie-updates/main amd64 Packages/DiffIndex [7 900 B]
Réception de : 2 jessie-updates/main Translation-en/DiffIndex [2 704 B]
Réception de : 3 jessie-backports/main Sources/DiffIndex [27,8 kB]
Réception de : 4 jessie-backports/main amd64 Packages/DiffIndex [27,8 kB]
Réception de : 5 jessie-backports/main Translation-en/DiffIndex [27,8 kB]
Atteint jessie/main Sources
Atteint jessie/contrib Sources
Atteint jessie/non-free Sources
Atteint jessie/main amd64 Packages
Atteint jessie/contrib amd64 Packages
Atteint jessie/non-free amd64 Packages
Atteint jessie/contrib Translation-en
Atteint jessie/main Translation-fr
Atteint jessie/main Translation-en
Atteint 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 egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-oCG_rH/cffi/”, line 110, in
File “/tmp/pip-build-oCG_rH/cffi/”, line 73, in use_pkg_config
_ask_pkg_config(include_dirs, ‘–cflags-only-I’, ‘-I’, sysroot=True)
File “/tmp/pip-build-oCG_rH/cffi/”, line 20, in _ask_pkg_config
File “/usr/lib/python2.7/”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 20] Not a directory


Command “python 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

for possible solutions.
You may also find some support resources at .
Starting nginx (via systemctl): nginx.service.

Does anyone find a way to fix it ?


have you confirmed 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):



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/


/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:



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.