搬瓦工中文网上篇介绍过在BandwagonHost VPS上安装Let’s Encrypt免费SSL的教程,部分搬瓦工VPS用户也上了Let’s Encrypt的免费SSL证书,不过在安装过程中也有用户反映问题。
对于原搬瓦工VPS也上SSL证书的教程,已经更新了命令行自动转义的错误,大家可以按教程安装。不过,有出现了新问题,如”No package python-virtualenv available”和”No package python-pip available”的情况。
BandwagonHost中文网的错误提示代码如下:
[root@localhost ~]# ./certbot-auto -n
Bootstrapping dependencies for RedHat-based OSes... (you can skip this with --no-bootstrap)
yum is /usr/bin/yum
To use Certbot, packages from the EPEL repository need to be installed.
Enabling the EPEL repository in 1 seconds...
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.sigmanet.com
* elrepo: repos.lax-noc.com
* extras: mirrors.usc.edu
* updates: mirror.hmc.edu
Package epel-release-6-8.noarch already installed and latest version
Nothing to do
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.sigmanet.com
* elrepo: repos.lax-noc.com
* extras: mirrors.usc.edu
* updates: mirror.hmc.edu
Package gcc-4.4.7-18.el6.i686 already installed and latest version
Package augeas-libs-1.0.0-10.el6.i686 already installed and latest version
Package openssl-1.0.1e-57.el6.i686 already installed and latest version
Package openssl-devel-1.0.1e-57.el6.i686 already installed and latest version
Package libffi-devel-3.0.5-3.2.el6.i686 already installed and latest version
Package redhat-rpm-config-9.0.3-51.el6.centos.noarch already installed and latest version
Package ca-certificates-2016.2.10-65.4.el6.noarch already installed and latest version
Package python-2.6.6-66.el6_8.i686 already installed and latest version
Package python-devel-2.6.6-66.el6_8.i686 already installed and latest version
No package python-virtualenv available.
Package python-tools-2.6.6-66.el6_8.i686 already installed and latest version
No package python-pip available.
Nothing to do
Upgrading certbot-auto 0.14.1 to 0.14.2...
Replacing certbot-auto...
Creating virtual environment...
./certbot-auto: line 681: virtualenv: command not found
安装SSL证书出现以上问题,主要是安装Let’s Encrypt免费SSL证书时,要求的python版本是2.7,但系统默认是2.6.6版本,所以解决的办法就相对简单了,要么安装python-virtualenv和python-pip,要么升级python版本至2.7。
这里,搬瓦工中文网给出自己亲测无需升级python版本至2.7版本,而是简单安装python-virtualenv和python-pip的方法。
具体命令如下:
yum install python-setuptools
easy_install virtualenv
easy_install pip
简单三行命令,即可安装python-virtualenv和python-pip,再执行
./certbot-auto -n
这次是不是就正常了,按教程获取免费的SSL证书吧,呵呵~
BandwagonHost官网:点击直达
不知道百度对SSL的测试阶段过了没?
已经支付的不错了。
之前碰到这个问题,没解决就没玩了。
你的也上SSL了,呵呵~
运行easy_install virtualenv
的时候报错
Traceback (most recent call last):
File “/usr/bin/easy_install”, line 5, in
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
我该怎么办?
你是什么系统?
运行easy_install virtualenv
的时候报错
Traceback (most recent call last):
File “/usr/bin/easy_install”, line 5, in
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
我该怎么办?
——————————
突然发现了解决方案:
解决方案:
$ wget https://web.archive.org/web/20100225231201/http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
解决之后然后运行:./certbot-auto -n
遇到了新问题:
Bootstrapping dependencies for RedHat-based OSes… (you can skip this with –no-bootstrap)
yum is /usr/bin/yum
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.hostduplex.com
* epel-debuginfo: mirror.sfo12.us.leaseweb.net
* extras: mirror.web-ster.com
* ius: mirrors.kernel.org
* updates: mirror.hmc.edu
Package gcc-4.4.7-18.el6.i686 already installed and latest version
Package augeas-libs-1.0.0-10.el6.i686 already installed and latest version
Package openssl-1.0.1e-57.el6.i686 already installed and latest version
Package openssl-devel-1.0.1e-57.el6.i686 already installed and latest version
Package libffi-devel-3.0.5-3.2.el6.i686 already installed and latest version
Package redhat-rpm-config-9.0.3-51.el6.centos.noarch already installed and latest version
Package ca-certificates-2017.2.14-65.0.1.el6_9.noarch already installed and latest version
Package python-2.6.6-66.el6_8.i686 already installed and latest version
Package python-devel-2.6.6-66.el6_8.i686 already installed and latest version
No package python-virtualenv available.
Package python-tools-2.6.6-66.el6_8.i686 already installed and latest version
No package python-pip available.
Nothing to do
Creating virtual environment…
Installing Python packages…
Installation succeeded.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Failed to find executable apachectl in PATH: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
The apache plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError(‘Cannot find Apache control command apachectl’,)
感谢分享,呵呵~