高品质美国CN2VPS申请Let’s Encrypt免费SSL证书时报错解决办法

今天本站准给自己的512M内存VPS安装宝塔建站环境,环境安装后并且绑定了域名,想开启https访问时,想给域名安装Let’s Encrypt的免费SSL证书,但是在申请过程当中,提示了下面错误。

Bootstrapping dependencies for RedHat-based OSes that will use Python3… (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 3 seconds…[0K Enabling the EPEL repository in 2 seconds…[0K Enabling the EPEL repository in 1 second… Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * base: linux.mirrors.es.net * elrepo-kernel: ftp.osuosl.org * extras: centos.mirror.ndchost.com * updates: mirror.keystealth.org Package epel-release-6-8.noarch already installed and latest version Nothing to do No supported Python package available to install. Aborting bootstrap!

使用翻译软件翻译了下,是Python版本太低的原因,本站的高品质美国CN2VPS使用的是Centos 6系统,Python版本是2.6.6。想要成功申请Let’s Encrypt免费SSL域名证书,Python版本必须高于2.7。于是尝试着使用下面命令把Python到2.7以上版本。

wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 #下载Python-2.7.3 tar -jxvf Python-2.7.3.tar.bz2 #解压 cd Python-2.7.3 #更改工作目录 ./configure #安装 make all #安装 make install #安装 make clean #安装 make distclean #安装 /usr/local/bin/python2.7 -V  #查看版本信息 mv /usr/bin/python /usr/bin/python2.6.6 #建立软连接,使系统默认的 python指向 python2.7 ln -s /usr/local/bin/python2.7 /usr/bin/python #建立软连接,使系统默认的 python指向 python2.7 python -V #检验Python 版本 vi /usr/bin/yum  #将文件头部的#!/usr/bin/python 改成#!/usr/bin/python2.6.6

 

虽然使用上面的方法成功把Python升级成了2.7.3版本,但是宝塔面板也无法打开了。所以如果是生产环境的系统,就不要使用上面的方案解决了,以免带来不必要的损失。

经过上面的体验,我们在高品质美国CN2VPS安装宝塔面板最好选择Centos 7系统,。如果非要使用Centos 6系统,那么最好在安装建站环境前先升级Python到2.7以上版本。

如果你想购买高品质美国CN2VPS,可以查看下面文章:

高品质美国CN2VPS购买使用教程合集

高品质美国CN2512M内存VPS断货后最实惠套餐汇总/1核1G内存VPS总汇

高品质美国CN2VPS洛杉矶QNET数据中心改为CN2优化线路 QNET数据中心套餐汇总

高品质美国CN2香港VPS补货1核1G/1Gbps/20GB SSD/KVM/9.99美刀/月

#推荐#高品质美国CN2512M内存VPS如期补货 高品质美国CN2512M内存套餐总汇

推荐站内搜索:ip地址详细查询、腾讯云服务器、备案信息、网站备案号、免费注册网站域名、vps国外服务器、香港主机高防、电信服务器租用、虚拟主机租用、快速网站备案、