我想使用 下载一个文件wget https://curl.haxx.se/download/archeology/curl-7.16.2.tar.gz
。从朋友的电脑上完成了这件事,没有出现任何错误。
然而,当我尝试从我的电脑上执行此操作时(我在电脑上使用了一些证书),在建立 FTPS 客户端时,出现了以下错误:
ERROR: cannot verify curl.haxx.se's certificate, issued by '=== MY CERTIFICATE DETAILS ===':
Unable to locally verify the issuer's authority.
To connect to curl.haxx.se insecurely, use `--no-check-certificate'.
我使用了 来--no-check-certificate
解决这个问题,一切顺利,但我的问题是,为什么会弹出这个错误?我没有要求安全连接,只是wget
- 从我在朋友的电脑上看到的情况来看,它没有进行安全检查。
我该如何避免在以后的下载中出现此错误?(解决下划线原因,而不是使用--no-check-certificate
)
编辑:
$ apt-cache policy wget
wget:
Installed: 1.15-1ubuntu1.14.04.1
Candidate: 1.15-1ubuntu1.14.04.1
Version table:
*** 1.15-1ubuntu1.14.04.1 0
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
100 /var/lib/dpkg/status
1.15-1ubuntu1 0
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
$ apt-cache policy libssl1.0.0 ca-certificates
libssl1.0.0:
Installed: 1.0.1f-1ubuntu2.15
Candidate: 1.0.1f-1ubuntu2.15
Version table:
*** 1.0.1f-1ubuntu2.15 0
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
100 /var/lib/dpkg/status
1.0.1f-1ubuntu2 0
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
ca-certificates:
Installed: 20141019ubuntu0.14.04.1
Candidate: 20141019ubuntu0.14.04.1
Version table:
*** 20141019ubuntu0.14.04.1 0
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
100 /var/lib/dpkg/status
20130906ubuntu2 0
500 http://172.18.177.211/14.04.3/mirror/archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
答案1
/etc/wgetrc
您可以在 中或 中为特定用户预先配置 wget 调用~/.wgetrc
。也许在您朋友的电脑上,其中一个文件包含该指令
check_certificate = on/off
更多选项请参见https://www.gnu.org/software/wget/manual/wget.html#Startup-File