1

第一次尝试运行“certbot-auto”而不是“letsencrypt-auto”来更新服务器上的证书时,它似乎失败并显示了几条消息:

OSError: Command /root/.local/share/letsencrypt/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])

" --always-copy -U setuptools failed with error code 1

我的 CentOS 中内置的默认 Python 是 2.6,但我也有一个使用 Python 2.7 的 ALTINSTALL 设置。我无法将 Python 2.7 设为我的默认发行版,因为这会破坏 YUM,如果 YUM 不可用,certbot-auto 将无法访问“所需的 EPEL 存储库”。

我无法使用 Let's Encrypt 续订我的证书,非常感谢任何和所有帮助。

我运行了这个命令: ./certbot-auto --verbose

它产生了这个输出(打开 --verbose ):

在此处输入图像描述

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

我的操作系统是(包括版本):

CentOS 6.2
Python 2.6 (needed for YUM)
Python 2.7 as "altinstall"
Apache/2.2.15 

将 Python 2.7 设置为默认值会为 YUM 命令产生以下结果:(" no module named yum ")

在此处输入图像描述

4

0 回答 0