红联Linux门户
Linux帮助

阿里云安装certbot-auto

发布时间:2017-01-09 14:59:24来源:linux网站作者:tianfs
安装certbot-auto就是被各种折腾
好不容易来到这一步:
Reading package lists... Done  
Building dependency tree 
Reading state information... Done  
dialog is already the newest version.  
gcc is already the newest version.  
python is already the newest version.  
python-dev is already the newest version.  
ca-certificates is already the newest version.  
libssl-dev is already the newest version.  
augeas-lenses is already the newest version.  
libaugeas0 is already the newest version.  
libffi-dev is already the newest version.  
python-virtualenv is already the newest version.  
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.  
Creating virtual environment...  
Installing Python packages...  
 
然后就是被卡住了,经过各种查找,一个比较靠谱的说法是:内存不够了!
会产生这种错误:
x86_64-linux-gnu-gcc: internal compiler error: Killed (program cc1)
 
于是, 我关闭了各种我能够控制的程序,然后根据大神的说明做如下处理:
sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288  
sudo chmod 600 /swapfile  
sudo mkswap /swapfile  
sudo swapon /swapfile  
这种方法,下载原程序安装时通过,直接运行还在等待中。
 
终于成功了,安装过程中发现要做好几个问题:
1.你的内存要够用,否则,会出现 gcc报错;
2.pip的源,要换国内的,要用https的,否则会报警,也很烦;
3.先安装依赖,我是用源码安装的,python setup.py install,然后再./certbot-auto
4.出现Installing Python packages...后,可能要等很长时间,太长了就中断重新再来。
5.ubuntu版本低了就不好安装,最好16版本的,直接apt-get安装。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/27648.html