如何在 cygwin 上安装 cURL?

发布于 2024-09-17 11:44:33 字数 85 浏览 7 评论 0 原文

我尝试在 cygwin 上启用curl,但它显示bash:curl:找不到命令

如何在cygwin上安装curl?

I tried to enable curl on cygwin but it says bash: curl: command not found

How do I install curl on cygwin?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(17

蓬勃野心 2024-09-24 11:44:33

我刚刚遇到这个。

1) 从 http://cygwin.com/ 找到 cygwin setup.exe 文件并运行它。
2) 单击/输入首选项,直至到达“选择包”窗口。 (见图)
3) 单击 (+) 获取网络
4) 单击curl 条目。 (确保选中二进制的复选框)
5)安装。
6) 打开 cygwin 窗口并输入curl.exe(现在应该可用)。

Cygwin 包管理器

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 package manager

夜未央樱花落 2024-09-24 11:44:33

在 Cygwin 包管理器中,单击“net”类别中的“curl”。是的,就是这么简单。

In the Cygwin package manager, click on curl from within the "net" category. Yes, it's that simple.

怪我鬧 2024-09-24 11:44:33

没有人说如何

在 cygwin 中

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

安装 apt-cyg现在就可以了

apt-cyg install curl

更多请参见 github 存储库 >apt-cyg

Nobody said how to install apt-cyg

in cygwin

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

now you can

apt-cyg install curl

For more, see the official github repository of apt-cyg.

半仙 2024-09-24 11:44:33

apt-cyg 是一个类似于 apt-get 的出色安装程序,可以轻松安装 Cygwin 的任何软件包。

$ apt-cyg install curl

注意: 应首先安装apt-cyg。您可以从 Windows 命令行执行此操作:

cd c:\cygwin
cygwinsetup.exe -q -P wget,tar,qawk, bzip2,vim,lynx

关闭 Windows cmd,然后打开 Cygwin Bash。

$ lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg install apt-cyg /bin
$ chmod +x /bin/apt-cyg

apt-cyg is a great installer similar to apt-get to easily install any packages for Cygwin.

$ apt-cyg install curl

Note: apt-cyg should be first installed. You can do this from Windows command line:

cd c:\cygwin
cygwinsetup.exe -q -P wget,tar,qawk, bzip2,vim,lynx

Close Windows cmd, and open Cygwin Bash.

$ lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg install apt-cyg /bin
$ chmod +x /bin/apt-cyg
心奴独伤 2024-09-24 11:44:33

为了使用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.

森林迷了鹿 2024-09-24 11:44:33

为了安装任何软件包,我们必须首先找到 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)

荭秂 2024-09-24 11:44:33

我在其主页的 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 find curl.exe in the local /usr/bin folder and put it into my /bin folder of c:\cygwin

Finally I could use cURL!

This drove me crazy. I hope it helps someone!

明月夜 2024-09-24 11:44:33

我刚刚遇到了这个。

如果您没有在列表中看到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.

北方的韩爷 2024-09-24 11:44:33

您可以尝试:

apt-cyg install curl

You can try:

apt-cyg install curl
月下凄凉 2024-09-24 11:44:33

供将来参考:

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.

梦忆晨望 2024-09-24 11:44:33

如果有人在 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.

空名 2024-09-24 11:44:33

如果您没有看到某个软件包,您可以访问完整的端口列表(也是非官方的,您在网络上看到的软件包),使用 -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 value http://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.

念三年u 2024-09-24 11:44:33

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)

难以启齿的温柔 2024-09-24 11:44:33

从文档中:

安装和更新适用于 64 位版本 Windows 的 Cygwin

每当您想要更新或安装 Cygwin 时运行 setup-x86_64.exe
适用于 64 位 Windows 的软件包。 setup-x86_64.exe 的签名可以是
用于使用此公钥验证此二进制文件的有效性。

https://cygwin.com/install.html

From the documentation:

Installing and Updating Cygwin for 64-bit versions of Windows

Run setup-x86_64.exe any time you want to update or install a Cygwin
package for 64-bit windows. The signature for setup-x86_64.exe can be
used to verify the validity of this binary using this public key.

https://cygwin.com/install.html

旧人哭 2024-09-24 11:44:33

在要安装 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

嗫嚅 2024-09-24 11:44:33

安装 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.

意中人 2024-09-24 11:44:33

即使在下面也会安装curl

cd c:\cygwin
setup.exe -q -P 卷曲

Even below will install curl

cd c:\cygwin
setup.exe -q -P curl

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文