我在让cURL在Windows上运行时遇到了麻烦。

我已经从这里下载了一个cURL zip文件,但它似乎包含源代码,而不是可执行文件。

我需要编译cURL来运行它吗?如果是,那么我该怎么做?

我在哪里可以找到cURL的.exe下载?

我已经寻找了关于安装cURL的文档,但是几乎找不到。


当前回答

我尝试用多种方式安装curl,但最终开始使用gitbash终端来执行curl命令。

其他回答

在Windows上设置cURL最简单的教程是如何在Windows 7上使用cURL。它只有3个简单的步骤。

为Windows安装Chocolatey包管理器。安装后,只需输入choco install curl即可。然后你可以在终端上使用curl。

您可以在3个简单的程序中构建curl、openssl、libssh2和zlib的最新版本 步骤遵循本教程。

Curl是静态构建的,因此您不必分发必要的动态运行时。

您也可以从SourceForge下载预构建版本(x86和x64)。

从Windows 10版本1803开始(以及更早的内部版本17063),您不再安装curl。Windows包含在C:\Windows\System32\中的本机curl.exe(和tar.exe),您可以从常规CMD中直接访问。

C:\Users\vonc>C:\Windows\System32\curl.exe --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL

C:\Users\vonc>C:\Windows\System32\tar.exe --version
bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp

请参见初始公告和发布公告。

我在Windows上使用curl时遇到了很多问题。最后我使用了Cygwin,它默认包含curl。