每当我将wget用于以下内容或通常用于任何内容时,
sudo wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
我收到一个错误:
--2020-04-24 20:41:33-- https://www.dropbox.com/download?plat=lnx.x86_64
Resolving www.dropbox.com (www.dropbox.com)... 162.125.6.1, 2620:100:601c:1::a27d:601
Connecting to www.dropbox.com (www.dropbox.com)|162.125.6.1|:443... connected.
ERROR: cannot verify www.dropbox.com's certificate, issued by ‘CN=DigiCert SHA2 Extended Validation Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US’:
Unable to locally verify the issuer's authority.
To connect to www.dropbox.com insecurely, use `--no-check-certificate'.
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
这导致了更广泛的连接问题,但这是我似乎找不到太多支持的最常见和最直接的问题。使用Ubuntu 20.04,3小时前刚刚对我的电脑进行了重新映像(可能与此有关…(
编辑运行wget-d cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz:的附加信息
wget -d cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz
DEBUG output created by Wget 1.20.3 on linux-gnu.
Reading HSTS entries from /home/negfrequency/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'linux-4.17.2.tar.xz' (UTF-8) -> 'linux-4.17.2.tar.xz' (UTF-8)
--2020-04-24 20:33:17-- http://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz
Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.201.176, 2a04:4e42:50::432
Caching cdn.kernel.org => 151.101.201.176 2a04:4e42:50::432
Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.201.176|:80... connected.
Created socket 3.
Releasing 0x00005588dc6a7f10 (new refcount 1).
---request begin---
GET /pub/linux/kernel/v4.x/linux-4.17.2.tar.xz HTTP/1.1
User-Agent: Wget/1.20.3 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: cdn.kernel.org
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/x-xz
Last-Modified: Sat, 16 Jun 2018 07:34:25 GMT
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Accept-Ranges: bytes
Age: 4
Content-Length: 102167060
Accept-Ranges: bytes
Date: Sat, 25 Apr 2020 00:33:22 GMT
Via: 1.1 varnish
Connection: keep-alive
X-Served-By: cache-dca17760-DCA
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1587774798.899562,VS0,VE4554
---response end---
200 OK
Registered socket 3 for persistent reuse.
Length: 102167060 (97M) [application/x-xz]
Saving to: ‘linux-4.17.2.tar.xz’
linux-4.17.2.tar.xz 100%[===================>] 97.43M 6.87MB/s in 15s
2020-04-24 20:33:37 (6.35 MB/s) - ‘linux-4.17.2.tar.xz’ saved [102167060/102167060]
编辑:
附加信息/usr/bin/wget是路径:
ii ca-certificates 20190110ubuntu1 all Common CA certificates
ii wget 1.20.3-1ubuntu1 amd64 retrieves files from the web
当您尝试与之交谈的网站没有有效的SSL证书时,会弹出此错误。如果是这样的话,你将无法用他们的ssl解决他们的问题,除非你拥有那个远程网站。
因此,来自wget
的建议:使用--no-check-certificate
参数,因此wget在连接时不会尝试验证SSL。
如果您的错误是:Unable to locally verify the issuer's authority
,那么您应该确保您的服务器/计算机TIME是正确的。