gpt4 book ai didi

curl - 为什么 curl 不能下载 ffmpeg-2.7.ta​​r.bz2?

转载 作者:行者123 更新时间:2023-12-04 23:28:48 24 4
gpt4 key购买 nike

我正在开发 OS X Yosemite 10.10.2。我想使用 curl 命令下载 ffmpeg-2.7.ta​​r.bz2,如下所示:

curl -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2



它行不通。

但是它适用于其他网址。

添加 时提示如下--详细 选项:
$ curl --verbose -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2
* Hostname was NOT found in DNS cache
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.190.173.55...
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to ffmpeg.org (192.190.173.55) port 80 (#0)
> GET /releases/ffmpeg-2.7.tar.bz2 HTTP/1.1
> User-Agent: curl/7.37.1
> Host: ffmpeg.org
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 302 Found
< Location: http://211.167.105.70:80/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/ffmpeg.org/releases/ffmpeg-2.7.tar.bz2
< Connection: Close
<
{ [data not shown]
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
* Closing connection 0

我哪里做错了?

PS:
$ curl --version
curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz

最佳答案

您似乎正在使用代理 ( 211.167.105.70:80 ),它返回 302 redirect .

要使 curl 遵循 HTTP 重定向,请使用 --location 选项:

curl --verbose --location -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2

关于curl - 为什么 curl 不能下载 ffmpeg-2.7.ta​​r.bz2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30786023/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com