【问题标题】:curl does not support http2 on maccurl 在 mac 上不支持 http2
【发布时间】:2015-10-20 21:55:35
【问题描述】:

我有最新版本的 curl,但仍然没有看到 http2 显示为一项功能。我已按照相关问题的步骤进行操作,但仍然不走运。

$ /usr/local/Cellar/curl/7.43.0/bin/curl -V
curl 7.43.0 (x86_64-apple-darwin14.3.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets

有什么想法吗?

【问题讨论】:

    标签: curl homebrew http2


    【解决方案1】:

    brew info curl 列出了启用该功能所需的标志。

    brew reinstall curl --with-openssl --with-nghttp2 将更新您的安装。

    【讨论】:

    • @MarkFine :如果它解决了问题,你能用绿色检查来验证那个答案吗?
    【解决方案2】:

    Homebrew 团队最近 removed all options for the curl formula,但 curl-openssl 公式启用了 HTTP/2。

    brew install curl-openssl
    

    【讨论】:

      【解决方案3】:

      默认情况下,curl 不与nghttp2 一起编译。作为explained in this article,您需要通过--with-nghttp2 标志重新编译它并链接它(以替换Mac OS X 附带的原始curl

      # install cURL with nghttp2 support
      $  brew install curl --with-nghttp2
      
      # link the formula to replace the system cURL
      $  brew link curl --force
      
      # now reload the shell
      

      【讨论】:

      • 覆盖系统 curl 的任何问题?
      猜你喜欢
      • 2015-09-11
      • 2019-10-02
      • 2020-04-30
      • 2016-05-28
      • 1970-01-01
      • 1970-01-01
      • 2022-11-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多