When trying to run “certbot-auto” for the first time instead of “letsencrypt-auto” to renew certificates on a server, it seems to fail with a couple of messages:
OSError: Command /root/.local/share/letsencrypt/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])
" --always-copy -U setuptools failed with error code 1
The default Python built into my CentOS is 2.6, but I also have an ALTINSTALL setup with Python 2.7.
I cannot make Python 2.7 my default distribution, as this then breaks YUM, and certbot-auto is not able to access “the EPEL repository needed” if YUM is not available.
I am not able to renew my certificates with Let’s Encrypt, please, any and all help is greatly appreciated.
I ran this command:
./certbot-auto --verbose
It produced this output (with --verbose turned on):
Bootstrapping dependencies for RedHat-based OSes...
yum is /usr/bin/yum
To use Certbot, packages from the EPEL repository need to be installed.
Loaded plugins: security
Setting up Install Process
Package matching epel-release-6-7.noarch already installed. Checking for update.
Nothing to do
Loaded plugins: security
Setting up Install Process
Package gcc-4.4.6-3.el6.x86_64 already installed and latest version
Package dialog-1.1-9.20080819.1.el6.x86_64 already installed and latest version
Package augeas-libs-0.9.0-1.el6.x86_64 already installed and latest version
Package openssl-1.0.0-20.el6_2.5.x86_64 already installed and latest version
Package openssl-devel-1.0.0-20.el6_2.5.x86_64 already installed and latest version
Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version
Package redhat-rpm-config-9.0.3-34.el6.noarch already installed and latest version
Package ca-certificates-2010.63-3.el6_1.5.noarch already installed and latest version
Package python-2.6.6-29.el6_2.2.x86_64 already installed and latest version
Package python-devel-2.6.6-29.el6_2.2.x86_64 already installed and latest version
Package python-virtualenv-1.7-1.el6.noarch already installed and latest version
Package python-tools-2.6.6-29.el6_2.2.x86_64 already installed and latest version
Package python-pip-0.8-1.el6.noarch already installed and latest version
Package 1:mod_ssl-2.2.15-15.el6.centos.1.x86_64 already installed and latest version
Nothing to do
Creating virtual environment...
Running virtualenv with interpreter /usr/local/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in /root/.local/share/letsencrypt/bin/python2.7
Also creating executable in /root/.local/share/letsencrypt/bin/python
Installing setuptools..........................................
Complete output from command /root/.local/share/letsencrypt/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])
" --always-copy -U setuptools:
Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
Searching for setuptools
Reading http://pypi.python.org/simple/setuptools/
Best match: setuptools 32.3.0
Downloading https://pypi.python.org/packages/b0/04/d7aac18d0d8b1b9bd9b88af02af8090e72653753bced3226f9903cabb991/setuptools-32.3.0.zip#md5=f72378b7152ad33d8a33a44d673f5794
Processing setuptools-32.3.0.zip
Running setuptools-32.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hYCpVy/setuptools-32.3.0/egg-dist-tmp-0d8jk4
/usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'src_root'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 279, in <module>
File "<string>", line 214, in main
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
File "/usr/local/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 446, in easy_install
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 476, in install_item
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 655, in install_eggs
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 930, in build_and_install
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 919, in run_setup
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 62, in run_setup
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 105, in run
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 64, in <lambda>
File "setup.py", line 181, in <module>
File "/usr/local/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 264, in __init__
File "/usr/local/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 297, in finalize_options
File "/usr/bin/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1959, in load
ImportError: <module 'setuptools.dist' from '/usr/bin/setuptools-0.6c11-py2.7.egg/setuptools/dist.py'> has no 'check_specifier' attribute
----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 2098, in <module>
main()
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 928, in main
never_download=options.never_download)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1040, in create_environment
search_dirs=search_dirs, never_download=never_download)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 593, in install_setuptools
search_dirs=search_dirs, never_download=never_download)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 567, in _install_req
cwd=cwd)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1006, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /root/.local/share/letsencrypt/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])
" --always-copy -U setuptools failed with error code 1
My operating system is (include version):
CentOS 6.2
Python 2.6 (needed for YUM)
Python 2.7 as “altinstall”
Setting Python 2.7 as default yields the following for YUM commands:
(“no module named yum”)
My web server is (include version):
Apache/2.2.15
I can login to a root shell on my machine (yes or no, or I don’t know):
yes
BTW - the version of setuptools is as follows:
$ > easy_install --version
setuptools 32.3.1 from /usr/local/lib/python2.7/site-packages (Python 2.7)