用wget下载文件的时候出现报错 Issued certificate has expired (颁发的证书已经过期),如下图
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 has expired.
To connect to dlcdn.apache.org insecurely, use `--no-check-certificate'.
报错原因
这个是因为下载链接为https加密传输的协议,系统的证书和对应网站的证书对不上所以提示过期
解决办法
wget 加上 --no-check-certificate 跳过认证
例如
$ wget --no-check-certificate https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.82/src/apache-tomcat-8.5.82-src.tar.gz