windows curl 未被识别为内部或外部命令、可运行的程序或批处理文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28736666/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:58:40  来源:igfitidea点击:

Curl not recognized as an internal or external command, operable program or batch file

windowsbatch-filecurlcmdhockeyapp

提问by Nevin Raj Victor

I have installed curland have set it as environment variablein my system. But when running the curlcommand its giving an error 'curl' is not recognized as an internal or external command, operable program or batch file.I tried restarting my system but is of no use.I want this to upload my application to HockeyApp. Please help me out.I am using Windows 8.1.

我已经安装curlenvironment variable在我的系统中设置了它。但是当运行curl命令时它给出了一个错误'curl' is not recognized as an internal or external command, operable program or batch file.我尝试重新启动我的系统但没有用HockeyApp。我希望这将我的应用程序上传到. 请帮帮我。我使用的是 Windows 8.1。

回答by Nevin Raj Victor

Steps to install curl in windows

windows下安装curl的步骤

Install cURL on Windows

在 Windows 上安装 cURL

There are 4 steps to follow to get cURL installed on Windows.

在 Windows 上安装 cURL 需要遵循 4 个步骤。

Step 1 and Step 2 is to install SSL library. Step 3 is to install cURL. Step 4 is to install a recent certificate

第 1 步和第 2 步是安装 SSL 库。第 3 步是安装 cURL。第 4 步是安装最近的证书

Step One: Install Visual C++ 2008 Redistributables

第一步:安装 Visual C++ 2008 Redistributables

From https://www.microsoft.com/en-za/download/details.aspx?id=29For 64bit systems Visual C++ 2008 Redistributables (x64) For 32bit systems Visual C++ 2008 Redistributables (x32)

来自https://www.microsoft.com/en-za/download/details.aspx?id=29对于 64 位系统 Visual C++ 2008 Redistributables (x64) 对于 32 位系统 Visual C++ 2008 Redistributables (x32)

Step Two: Install Win(32/64) OpenSSL v1.0.0k Light

第二步:安装 Win(32/64) OpenSSL v1.0.0k Light

From http://www.shininglightpro.com/products/Win32OpenSSL.htmlFor 64bit systems Win64 OpenSSL v1.0.0k Light For 32bit systems Win32 OpenSSL v1.0.0k Light

来自http://www.shininglightpro.com/products/Win32OpenSSL.html对于 64 位系统 Win64 OpenSSL v1.0.0k Light 对于 32 位系统 Win32 OpenSSL v1.0.0k Light

Step Three: Install cURL

第三步:安装cURL

Depending on if your system is 32 or 64 bit, download the corresponding** curl.exe.** For example, go to the Win64 - Generic section and download the Win64 binary with SSL support (the one where SSL is not crossed out). Visit http://curl.haxx.se/download.html

根据您的系统是 32 位还是 64 位,下载相应的** curl.exe。** 例如,转到 Win64 - 通用部分并下载支持 SSL 的 Win64 二进制文件(未划掉 SSL 的那个). 访问http://curl.haxx.se/download.html

Copy curl.exe to C:\Windows\System32

将 curl.exe 复制到 C:\Windows\System32

Step Four: Install Recent Certificates

第四步:安装最近的证书

Do not skip this step. Download a recent copy of valid CERT files from https://curl.haxx.se/ca/cacert.pemCopy it to the same folder as you placed curl.exe (C:\Windows\System32) and rename it as curl-ca-bundle.crt

不要跳过此步骤。从https://curl.haxx.se/ca/cacert.pem下载有效 CERT 文件的最新副本 将其复制到放置 curl.exe 的同一文件夹(C:\Windows\System32)并将其重命名为curl- ca-bundle.crt

If you have already installed curlor after doing the above steps, add the directory where it's installed to the windows path:

如果你已经安装curl或者执行了上述步骤后,将安装目录添加到windows路径:

1 - From the Desktop, right-click My Computerand click Properties.
2 - Click Advanced System Settings.
3 - In the System Properties window click the Environment Variablesbutton.
4 - Select Pathand click Edit.
5 - Append ;c:\path to curl directoryat the end.
5 - Click OK.
6 - Closeand re-openthe command prompt

1 - 在桌面上,右键单击我的电脑,然后单击属性
2 - 单击高级系统设置
3 - 在系统属性窗口中单击环境变量按钮。
4 - 选择路径并单击编辑
5 - 最后将;c:\path附加到 curl 目录
5 - 单击确定
6 -关闭重新打开命令提示

回答by Pre_hacker

Here you can find the direct download link for Curl.exe

在这里您可以找到 Curl.exe 的直接下载链接

I was looking for the download process of Curland every where they said copy curl.exe file in System32but they haven't provided the direct link but after digging little more I Got it. so here it is enjoy, find curl.exeeasily in bin folderjust

我一直在寻找Curl的下载过程,以及他们说在 System32 中复制curl.exe 文件的每个地方但他们没有提供直接链接,但在进一步挖掘之后我明白了。所以这里是享受,找到curl.exe在轻松bin文件夹只是

unzip it and then go to bin folder there you get exe file

解压,然后进入bin文件夹,你会得到exe文件

link to download curl generic

下载 curl 通用链接

回答by Hassan Saeed

Method 1:\

方法一:\

add "C:\Program Files\cURL\bin" path into system variables Path right-click My Computer and click Properties >advanced > Environment Variables enter image description here

将“C:\Program Files\cURL\bin”路径添加到系统变量路径右键单击“我的电脑”,然后单击“属性”>“高级”>“环境变量” 在此处输入图片说明

Method 2:(if method 1 not work then)

方法二:(如果方法一不行)

simple open command prompt with "run as administrator"

使用“以管理员身份运行”的简单打开命令提示符