CentOS 6 下无法wget https链接的解决方法

Posted weiyiyong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 6 下无法wget https链接的解决方法相关的知识,希望对你有一定的参考价值。

CentOS6下最高版本的wget是1.11,但非常遗憾的是这个版本有bug,是没办法用来下载https链接的东西的,所以有些人为了避免这种情况会帮脚本加上不检查ssl的参数--no-check-certificate,但显然这个方法我并不是特别推荐,毕竟这并不是无解的。

而解决方法其实也不难,就是自己到gnu去下载新版本的wget来进行编译替换的动作。
方法如下:

yum -y install openssl openssl-devel gcc make perl
cd ~
wget http://ftp.gnu.org/gnu/wget/wget-1.16.tar.gz
yum -y remove wget
tar -xzvf wget-1.16.tar.gz
cd wget-1.16
./configure --with-ssl=openssl
make && make install
ln -s /usr/local/bin/wget /usr/bin/wget
cd ..
rm -rf wget-1.16*

替换完毕后你就可以开心地下载了.












以上是关于CentOS 6 下无法wget https链接的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

CentOS 6 安装 Python3.5

CentOS 6.x下wget 下载提示 Unable to locally verify the issuer’s authority 完美解决方案

CentOS 6.5下安装Python 3.5.2(与Python2并存)

CentOS6.8安装Python3.6.3

Centos 6下的wget进度条多行显示bug

centos上安装anaconda并配置虚拟环境