【问题标题】:bash curl command not found on OS X. Where can I find it?在 OS X 上找不到 bash curl 命令。我在哪里可以找到它?
【发布时间】:2013-10-03 00:35:44
【问题描述】:

我不知道自己要做什么,我对编程很陌生,并且试图自学。我正在尝试使用ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go) 安装自制软件,结果是 "-bash: curl: command not found"

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

当我输入 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)

然后我尝试任何类似 curl --version 的方法,它执行的 curl 命令未找到

【问题讨论】:

  • 听起来你没有安装curl。您使用什么操作系统?编辑:你提到了 Xcode,所以我猜你在 Mac 上。恐怕我在那里没有什么特别的帮助,但这就是“找不到命令”的意思。

标签: bash macos curl homebrew


【解决方案1】:

通过以下方式安装 curl:

sudo apt-get install curl

【讨论】:

【解决方案2】:

您也可以使用wget:

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

【讨论】:

    【解决方案3】:

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

    【讨论】:

      猜你喜欢
      • 2012-05-03
      • 1970-01-01
      • 1970-01-01
      • 2015-02-14
      • 2016-02-20
      • 2015-09-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多