Certbot: OSError: Command ~/.local/...ncrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 1

Created on 1 Jun 2016  ·  18Comments  ·  Source: certbot/certbot

I've tried to install my certificates thru this command.

$sudo ./certbot-auto

But every time I get this virtualenv error on my Ubuntu 16.04 server.

I tried the solutions on these issues but it doesn't work...

1559

1554

Hit:1 http://mirror.leaseweb.net/ubuntu xenial InRelease
Hit:2 http://mirror.leaseweb.net/ubuntu xenial-updates InRelease                                           
Hit:3 http://mirror.leaseweb.net/ubuntu xenial-backports InRelease                                         
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]                                                          
Ign:5 http://download.webmin.com/download/repository sarge InRelease                                                                 
Hit:6 http://download.webmin.com/download/repository sarge Release
Fetched 94.5 kB in 0s (177 kB/s)                       
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:",
    LC_ALL = (unset),
    LC_TIME = "nl_NL.UTF-8",
    LC_MONETARY = "nl_NL.UTF-8",
    LC_CTYPE = "en_US.UTF-8",
    LC_ADDRESS = "nl_NL.UTF-8",
    LC_TELEPHONE = "nl_NL.UTF-8",
    LC_NAME = "nl_NL.UTF-8",
    LC_MEASUREMENT = "nl_NL.UTF-8",
    LC_IDENTIFICATION = "nl_NL.UTF-8",
    LC_NUMERIC = "nl_NL.UTF-8",
    LC_PAPER = "nl_NL.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
augeas-lenses is already the newest version (1.4.0-0ubuntu1).
ca-certificates is already the newest version (20160104ubuntu1).
gcc is already the newest version (4:5.3.1-1ubuntu1).
libaugeas0 is already the newest version (1.4.0-0ubuntu1).
libffi-dev is already the newest version (3.2.1-4).
python is already the newest version (2.7.11-1).
python-dev is already the newest version (2.7.11-1).
dialog is already the newest version (1.3-20160209-1).
python-virtualenv is already the newest version (15.0.1+ds-3).
virtualenv is already the newest version (15.0.1+ds-3).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Creating virtual environment...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module>
    main()
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main
    symlink=options.symlink)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 988, in create_environment
    download=download,
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 918, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 812, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/yassin/.local/...ncrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 1

certbot-auto

Most helpful comment

Try using export LC_ALL="C" before running ./certbot-auto

I don't know why this works, but it worked on Ubuntu 16.04.

doing

All 18 comments

@erikrose thoughts?

Still not working....

Tried to install on a vm, also no succes and the same error message too....

Same issue with me. It works on Ubuntu 14.04 but fails on 16.04. I think it has something to do with the Python version. The later one ships with Python 3 only.

Try using export LC_ALL="C" before running ./certbot-auto

I don't know why this works, but it worked on Ubuntu 16.04.

doing

@hso Thanks it worked!

@hso thanks!!!!!

@hso thanks!

@hso wow... that worked, thanks!

Thanks man!

@hso thanks!

@hso thanks!

@hso works like a miracle

@hos thanks man!

Same problem, thanks @hso

http://unix.stackexchange.com/questions/87745/what-does-lc-all-c-do#87748

The C locale is a special locale that is meant to be the simplest locale. You could also say that while the other locales are for humans, the C locale is for computers. In the C locale, characters are single bytes, the charset is ASCII (well, is not required to, but in practice will be in the systems most of us will ever get to use), the sorting order is based on the byte values, the language is usually US English (though for application messages (as opposed to things like month or day names or messages by system libraries), it's at the discretion of the application author) and things like currency symbols are not defined.

I had the same problem while renewing the certificate. This worked for me:

sudo  LC_ALL="C" certbot-auto renew

Thanks man. It was really a big help to me. 💯 👍

Thank you so very very very very much!

Was this page helpful?
0 / 5 - 0 ratings