在 OS X 上找不到 bash curl 命令。我在哪里可以找到它?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19038458/
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-10 00:14:59  来源:igfitidea点击:

bash curl command not found on OS X. Where can I find it?

bashmacoscurlhomebrew

提问by user2821160

I have no idea what I am getting myself into, I am very new to programming and trying to learn on my own. I am trying to install homebrew with ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)and this the outcome is "-bash: curl: command not found"

我不知道自己在做什么,我对编程非常陌生,并试图自己学习。我正在尝试安装自制软件,ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)结果是“-bash:curl:找不到命令”

I have been searching Google but can't seem to find anything to help me. when I type which curlit just goes to the next line of terminal as if I just opened terminal...
I have xcode installed with command line tools installed, and even downloaded reinstalled it in case something was wrong with it. Not that it matters but the reason I am attempting to install homebrew is it is needed for libsodium which is needed for dnscrypt.

我一直在搜索谷歌,但似乎找不到任何可以帮助我的东西。当我输入which curl它时,它就像我刚刚打开终端一样进入终端的下一行......
我安装了 xcode 并安装了命令行工具,甚至下载了重新安装它以防万一它出现问题。这并不重要,但我尝试安装自制软件的原因是 libsodium 需要它,而 dnscrypt 需要它。

When I type curl-configit gives me available values for OPTION include:

当我输入时,curl-config它为我提供了 OPTION 的可用值,包括:

  --built-shared says 'yes' if libcurl was built shared
  --ca        ca bundle install path
  --cc        compiler
  --cflags    pre-processor and compiler flags
  --checkfor [version] check for (lib)curl of the specified version
  --configure the arguments given to configure when building curl
  --features  newline separated list of enabled features
  --help      display this help and exit
  --libs      library linking information
  --prefix    curl install prefix
  --protocols newline separated list of enabled protocols
  --static-libs static libcurl library linking information
  --version   output version information
  --vernum    output the version information as a number (hexadecimal)

Then I try any of of those like curl --versionand it does the same curl command not found

然后我尝试其中的任何一个,curl --version它执行相同的 curl 命令未找到

采纳答案by konsolebox

As an alternative you can use wget:

作为替代方案,您可以使用wget

ruby -e "$(wget -qO - 'https://raw.github.com/mxcl/homebrew/go')"

回答by Chip

Install curl by:

通过以下方式安装 curl:

sudo apt-get install curl

回答by Loren

I finally installing homebrew to work by changing to the zsh terminal - just type zsh when you open the terminal (maybe there is a better way). I didn't directly install curl, just xcode.

我终于通过切换到 zsh 终端来安装自制软件来工作 - 只需在打开终端时输入 zsh (也许有更好的方法)。我没有直接安装curl,只是安装了xcode。