如何在 cygwin 上安装 cURL?
我尝试在 cygwin 上启用curl,但它显示bash:curl:找不到命令
如何在cygwin上安装curl?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我尝试在 cygwin 上启用curl,但它显示bash:curl:找不到命令
如何在cygwin上安装curl?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(17)
我刚刚遇到这个。
1) 从 http://cygwin.com/ 找到 cygwin setup.exe 文件并运行它。
2) 单击/输入首选项,直至到达“选择包”窗口。 (见图)
3) 单击 (+) 获取网络
4) 单击curl 条目。 (确保选中二进制的复选框)
5)安装。
6) 打开 cygwin 窗口并输入curl.exe(现在应该可用)。
I just encountered this.
1) Find the cygwin setup.exe file from http://cygwin.com/ and run it.
2) Click/enter preferences until you reach the "Select Packages" window. (See image)
3) Click (+) for Net
4) Click the entry for curl. (Make sure you select the checkbox for the Binary)
5) Install.
6) Open a cygwin window and type curl.exe (should be available now).
在 Cygwin 包管理器中,单击“net”类别中的“curl”。是的,就是这么简单。
In the Cygwin package manager, click on curl from within the "net" category. Yes, it's that simple.
没有人说如何
在 cygwin 中
安装 apt-cyg现在就可以了
更多请参见
github 存储库 >apt-cyg
。Nobody said how to install apt-cyg
in cygwin
now you can
For more, see the official github repository of
apt-cyg
.apt-cyg
是一个类似于 apt-get 的出色安装程序,可以轻松安装 Cygwin 的任何软件包。注意: 应首先安装
apt-cyg
。您可以从 Windows 命令行执行此操作:关闭 Windows cmd,然后打开 Cygwin Bash。
apt-cyg
is a great installer similar to apt-get to easily install any packages for Cygwin.Note:
apt-cyg
should be first installed. You can do this from Windows command line:Close Windows cmd, and open Cygwin Bash.
为了使用curl的命令行版本,您需要curl可执行文件。
因此,运行 Cygwins Setup.exe,然后选择“curl”(在“Net”->“curl”下)。那个使用了libcurl3,它位于Libs->libcurl3中。但如果尚未安装 libcurl3,则会将其作为依赖项引入。
因此,只需选择 Net->curl 就可以了。
In order to use the command-line version of curl, you need the curl executable.
So, run the Cygwins Setup.exe, and select curl (under Net->curl). That one uses libcurl3, which is located in Libs->libcurl3. But libcurl3 will be pulled in as a dependency if it's not already installed.
So, just select Net->curl and you're good to go.
为了安装任何软件包,我们必须首先找到 setup.exe 文件。我找不到这个文件。所以我下载了这个文件(或者你可以执行 wget)。我使用的是 windows64 位。所以,如果你去https://cygwin.com/install.html ,您可以从安装和更新部分下载 setup-x86_64.exe 文件,将此 setup-x86_64.exe 移至 c:/cygwin64,然后从那里运行它 ( setup-x86_64.exe -q -P curl )
In order to install any package,we must first find the setup.exe file.I could not locate this file.so i downloaded this file (or you can do a wget).I am on windows64 bit.So ,if you go to https://cygwin.com/install.html ,you can download setup-x86_64.exe file from the install and updates section,move this setup-x86_64.exe to your c:/cygwin64,and then run it from there ( setup-x86_64.exe -q -P curl)
我在其主页的 cygwin 包部分搜索了curl。
我找到了这个链接
http://cygwin.com/packages/curl/
。但这没有帮助,因为我无法下载任何东西
,所以我在 Google 上搜索了
curl-7.20.1-1 cygwin
。我发现这个有用的网站
mirrors.xmission.com/cygwin/release/curl/
该网站有一个下载
curl-7.20.1-1.tar.bz2
的链接。我用7zip解压的。它将其解压缩到./user/bin/
或其他内容中,因此我必须在本地/usr/bin
文件夹中找到curl.exe
并将其放入c:\cygwin
的/bin
文件夹中终于可以使用 cURL 了!
这让我发疯。我希望它能帮助别人!
I searched for curl on the cygwin packages part of their home page.
I found this link
http://cygwin.com/packages/curl/
.But that wasn't helpful because I couldn't download anything
So I searched for the
curl-7.20.1-1 cygwin
on Google.I found this helpful site
mirrors.xmission.com/cygwin/release/curl/
That site had a link to download
curl-7.20.1-1.tar.bz2
. I unzipped it using 7zip. It unzips it into./user/bin/
or something so I had to findcurl.exe
in the local/usr/bin
folder and put it into my/bin
folder ofc:\cygwin
Finally I could use cURL!
This drove me crazy. I hope it helps someone!
我刚刚遇到了这个。
如果您没有在列表中看到curl(请参阅ibaralf 的屏幕截图),那么您的cygwin 源代码可能已过时。在 cygwin setup.exe 向导的屏幕之一中,您可以选择“从 Internet 安装”或“从本地目录安装”。如果启用了“从本地目录安装”选项,则您可能不会在列表中看到curl。切换到“从互联网安装”并选择一个镜像,然后您应该看到curl。
I just ran into this.
If you're not seeing curl in the list (see ibaralf's screenshot), then you may have out-of-date cygwin sources. In one of the screens in cygwin's setup.exe wizard, you have the option to "Install from Internet" or "Install from Local Directory". If you have the "Install from Local Directory" option enabled, then you may not see curl in the list. Switch to "Install from Internet" and select a mirror and then you should see curl.
您可以尝试:
You can try:
供将来参考:
Cygwin 附带了许多软件包(其中有curl,正如您所发现的)来安装一个其中运行
setup.exe
程序。For future reference:
Cygwin comes with many packages (among them curl, as you found) to install one of them you run the
setup.exe
program.如果有人在 setup.exe(Cygwin 包管理器)的列表中查找 CURL 时遇到问题,请尝试下载此安装程序的 64 位版本。为我工作。
If someone is having problem with finding CURL in the list in setup.exe (Cygwin package manager) then trying downloading 64bit version of this setup. Worked for me.
如果您没有看到某个软件包,您可以访问完整的端口列表(也是非官方的,您在网络上看到的软件包),使用
-k
参数启动 setup.exe,其值为 < code>http://cygwinports.org/ports.gpg (示例:C:\cygwin\setup\setup-x86.exe -K http://cygwinports.org/ports. gpg
)。这样做,您可以选择许多额外的软件包,以及 cURL 的额外版本(兼容版本)。
我这样做是为了获取 Apache、cUrl、php5、php5-curl 和其他一些 :)
我不知道 apt-cyg 是否可以获得这些额外的软件包。
If you don't see a certain package, you can access to a full list of ports (also unnoficials, the packages you see on the web) launching the setup.exe with
-k
argument with valuehttp://cygwinports.org/ports.gpg
(example:C:\cygwin\setup\setup-x86.exe -K http://cygwinports.org/ports.gpg
).Doing so, you can choose a lot of extra packages, also extra versions of cURL (compat one).
I do that to get Apache, cUrl, php5, php5-curl and some others :)
I don't know if apt-cyg can get those extra packages.
我刚刚从curl网站 curl.haxx.se 进入驱动器 C: 上的 cygwin64 文件夹。然后我在 cygwin 命令终端中将它与前缀curl一起使用。
我从softpedia的实际下载位置,我使用过Softpedia镜子(美国)
I just copied the folder "curl-7.43.0" from zip file that I downloaded from curl website curl.haxx.se into cygwin64 folder on drive C:. And then I have used it with prefix curl in cygwin command terminal.
My actual download location from softpedia, I have used Softpedia Mirror (US)
从文档中:
https://cygwin.com/install.html
From the documentation:
https://cygwin.com/install.html
在要安装 Cygwin 的 Windows 系统上,通过 cURL 下载并运行
64 位 Cygwin 安装程序:cygwin.com/setup-x86_64.exe
32 位:cygwin.com/setup-x86.exe
(如果已经安装,请转到安装文件存在的路径)
D:\cygwin\setup(Cygwin 所在的位置)
单击安装程序 (setup-x86_64)
按照 Cygwin 安装向导中的提示进行操作。
您可以将大多数设置保留为默认值。请特别注意以下事项:
在“选择您的 Internet 连接”屏幕中,选择“从 Internet 安装”。
在“选择下载站点”屏幕中,从列表中选择一个站点,或将您自己的站点添加到列表中,我选择了:“mirrors.xmission.com”。
选择包屏幕显示所有可用包的列表,并让您选择要安装的那些。默认情况下,仅将“Base”类别中的软件包标记为安装。 “基础”类别不包括 cURL 等工具。您应该明确选择这些。
默认情况下,包按类别分组。单击“查看”按钮切换到完整视图
通过单击每个包的“跳过”按钮一次来选择所有的curl 包。请注意“跳过”标签如何更改以显示所选包的版本号。
“选择包”屏幕应如下所示
单击“下一步”完成向导的其余部分。将下载并安装所选的软件包。
它对我有用并解决了问题:bash curl command not found cygwin
On the Windows system where you want to install Cygwin with cURL download and run the Cygwin installer
64-bit: cygwin.com/setup-x86_64.exe
32-bit: cygwin.com/setup-x86.exe
(if already installed, go to the setup file existed path)
D:\cygwin\setup (where the Cygwin is existed)
Click on the setup (setup-x86_64)
Follow the prompts in the Cygwin Setup wizard.
You can leave most settings at their default values. Pay specific attention to the following:
In the Select Your Internet Connectioin screen, select "Install from Internet".
In the Choose a download site screen, choose a site from the list, or add your own sites to the list, I have Chosen a: “mirrors.xmission.com”
The Select Packages screen displays a list of all the available packages and lets you select those you want to install. By default, only the packages in the "Base" category are marked for installation. The "Base" category does not include tools like cURL. You should select those explicitly.
By default, the packages are grouped by category. Click the View button to toggle to the Full view
Select all the curl packages by clicking the "Skip" button for each package once. Note how the "Skip" label changes to show the version number of the selected package.
the Select Packages screen should look like
Click Next through the rest of the wizard. The selected packages are downloaded and installed.
It worked for me and it resolved the issue : bash curl command not found cygwin
安装 libcurl-devel 对我有用。
运行 cygwin 安装程序。到达选择包窗口后,搜索curl,如屏幕截图所示< /a>.选择 libcurl-devel 并安装该软件包。
Installing
libcurl-devel
worked for me.Run cygwin setup. After you reach the Select package window search for curl, as shown in the screenshot. Select
libcurl-devel
and install the package.即使在下面也会安装curl
Even below will install curl