当前位置:网站首页 / Linux / 正文

linux宝塔面板申请https证书失败的处理

时间:2018年02月26日 | 作者 : liuhui | 分类 : Linux | 浏览: 9847次 | 评论 0

阿里云限量代金券 | 此广告位出租25元/月

今天想给自己的linux服务器安装宝塔面板,并绑定了域名,想开通https访问,需要申请Let’s Encrypt免费证书时提示了下面的错误:

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… Enabling the EPEL repository in 2 seconds… 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版本太低的原因,我使用的是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版本,但是宝塔面板也无法打开了。所以如果是生产环境的系统,就不要使用上面的方案解决了,以免带来不必要的损失。


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

推荐您阅读更多有关于“”的文章

猜你喜欢

网站分类
关注电脑博士
友情链接

分享:

支付宝

微信