简体   繁体   English

如何防止冲泡安装卷曲包装?

[英]How to prevent brew to install curl package?

The 'curl' provided by brew doesn't work well with my proxy and I would like to just use system provided one. brew提供的“ curl”在我的代理服务器上无法正常使用,我只想使用提供的系统。

How could I let brew know "never try to install curl"? 我如何让brew知道“从不尝试安装卷发”?

You can't. 你不能 Homebrew will force use a new version but not the system one, if 如果出现以下情况,自制软件将强制使用新版本,而不是系统版本:

  • macOS version is less than 10.10, or macOS版本低于10.10,或
  • curl version is less than 7.41.0 卷曲版本小于7.41.0

This is done on purpose to ensure the Curl supports modern HTTPS certificates. 这样做是为了确保Curl支持现代HTTPS证书。

Related source code from homebrew. 自制软件的相关源代码。

  if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101000" ]]
  then
    HOMEBREW_SYSTEM_CURL_TOO_OLD="1"
    HOMEBREW_FORCE_BREWED_CURL="1"
  fi

  # ...

  # Ensure the system Curl is a version that supports modern HTTPS certificates.
  HOMEBREW_MINIMUM_CURL_VERSION="7.41.0"
  system_curl_version_output="$($(command -v curl) --version 2>/dev/null)"
  system_curl_name_and_version="${system_curl_version_output%% (*}"
  if [[ $(numeric "${system_curl_name_and_version##* }") -lt $(numeric "$HOMEBREW_MINIMUM_CURL_VERSION") ]]
  then
    HOMEBREW_SYSTEM_CURL_TOO_OLD="1"
    HOMEBREW_FORCE_BREWED_CURL="1"
  fi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM