Centos wget使用的问题

在使用CentOS的wget工具从Java网站下载文件时遇到证书问题,原因是wget版本低于1.12.1不支持Server Alternative Names扩展。解决方法是检查wget版本,并通过`yum update wget`进行更新。或者,可以使用`--no-check-certificate`选项临时绕过证书检查。
摘要由CSDN通过智能技术生成

遇到的问题:

[root@localhost src]# wget -c https://dl.google.com/go/go1.9.6.linux-amd64.tar.gz
--2018-05-04 02:42:54--  https://dl.google.com/go/go1.9.6.linux-amd64.tar.gz
Resolving dl.gocn.io... 120.132.12.8
Connecting to dl.gocn.io|120.132.12.8|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://golang.google.cn/dl [following]
--2018-05-04 02:42:54--  https://golang.google.cn/dl
Resolving golang.google.cn... 203.208.43.87, 203.208.43.88, 203.208.43.79, ...
Connecting to golang.google.cn|203.208.43.87|:443... connected.
ERROR: certificate common name “google.com” doesn’t match requested host name “golang.google.cn”.
To connect to golang.google.cn insecurely, use ‘--no-check-certificate’.

[root@localhost src]#  

问题解决方式:

the ceritificate problem when i use wget a file from java webside

reason is 

wget before 1.12.1 do not support the Server Alternative Names extension

wget  --version //check the version

so just update the wget

yum update wget

总结,执行:yum update wget

[root@localhost src]# yum update wget
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * atomic: mirrors.neusoft.edu.cn
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.163.com
atomic                                                                                                | 3.4 kB     00:00
base                                                                                                  | 3.7 kB     00:00
extras                                                                                                | 3.4 kB     00:00
updates                      
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值