26

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

我一直在搜索谷歌,但似乎找不到任何可以帮助我的东西。当我输入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 命令未找到

4

3 回答 3

66

通过以下方式安装 curl:

sudo apt-get install curl
于 2013-09-26T20:52:14.967 回答
2

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

ruby -e "$(wget -qO - 'https://raw.github.com/mxcl/homebrew/go')"
于 2013-09-26T21:36:46.193 回答
-2

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

于 2017-06-26T16:34:55.753 回答