解决linux下载wget报错信息To connect to dlcdn.apache.org insecurely, use `--no-check-certificate‘.

在使用远程调用wget网络下载http时正常,但下载遇到https时可能报错
例如:

[root@node1 ~]# wget -c https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.79/bin/apache-tomcat-8.5.79.tar.gz
--2022-03-26 23:02:35--  https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.79/bin/apache-tomcat-8.5.79.tar.gz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132, 2a04:4e42::644
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... connected.
ERROR: cannot verify dlcdn.apache.org's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3:
  Issued certificate not yet valid.
To connect to dlcdn.apache.org insecurely, use `--no-check-certificate'.

报错信息解决第一种方法可以
安装该yum源

[root@node1 ~]# yum install  ca-certificates -y

解决第二种方法是在 https 前面加上 --no-check-certificate 即可
例如:

[root@node1 ~]# wget --no-check-certificate -c https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.79/bin/apache-tomcat-8.5.79.tar.gz

现在报错信息可以解决

你可能感兴趣的:(apache,linux,tomcat)