Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Please update your system cURL #367

Closed
HariSekhon opened this issue Dec 4, 2020 · 8 comments
Closed

Error: Please update your system cURL #367

HariSekhon opened this issue Dec 4, 2020 · 8 comments
Labels

Comments

@HariSekhon
Copy link
Contributor

HariSekhon commented Dec 4, 2020

What you were trying to do (and why)

Several of my CI builds that used to work are failing when running the HomeBrew installer.

Install via running

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash

What happened (include command output)

HEAD is now at cb38fe6e3 Merge pull request #9413 from Rylan12/pypi-fix
Error: Please update your system cURL.
Minimum required version: 7.41.0
Your cURL version: 7.35.0
Your cURL executable: /usr/bin/curl
Error: Curl must be installed and in your PATH!
Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force

What you expected to happen

Expected it to install as I've been using the Homebrew scripts to install it for quite a long time and inside CI builds too.

It's not clear to me why this now needs a newer version of curl, for what reason, and from where in the code this error is coming from...

Step-by-step reproduction instructions (by running brew commands)

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash

@HariSekhon
Copy link
Contributor Author

Upon further reflection I appreciate this might be a problem with brew itself and not the installer script judging by the fact it fails during:

Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force`

@MikeMcQuaid
Copy link
Member

You need to update your system cURL, as the message says. The output code is not from the installed but from brew. Please do not reopen this issue there.

@HariSekhon
Copy link
Contributor Author

Sorry it was midnight here and I realized this after I opened it.

Although the underlying point was that brew install should work across OS systems even if they're not the very latest release and was wondering if there was any workaround. For now I'll probably just stop using brew in older CI builds to avoid a bunch of broken builds.

I will raise it instead with the brew project so that to see why they need to use such a specific version of curl.

@MikeMcQuaid
Copy link
Member

I will raise it instead with the brew project so that to see why they need to use such a specific version of curl.

Please don't. You can check the commit logs and existing pull requests to find out why we require the version we do. The workaround is installing a newer version on your system.

@HariSekhon
Copy link
Contributor Author

HariSekhon commented Dec 4, 2020

Ok, trawled the git log and code and found the answer here:

https://github.com/Homebrew/brew/blob/master/Library/Homebrew/brew.sh#L353

 if [[ -n "$HOMEBREW_FORCE_HOMEBREW_ON_LINUX" && -n "$HOMEBREW_ON_DEBIAN7" ]]
  then
    # Special version for our debian 7 docker container used to build patchelf and binutils
    HOMEBREW_MINIMUM_CURL_VERSION="7.25.0"
  else
    # Ensure the system Curl is a version that supports modern HTTPS certificates.
    HOMEBREW_MINIMUM_CURL_VERSION="7.41.0"
  fi
  curl_version_output="$($HOMEBREW_CURL --version 2>/dev/null)"
  curl_name_and_version="${curl_version_output%% (*}"
  if [[ $(numeric "${curl_name_and_version##* }") -lt $(numeric "$HOMEBREW_MINIMUM_CURL_VERSION") ]]
  then
      message="Please update your system cURL.
Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}
Your cURL version: ${curl_name_and_version##* }
Your cURL executable: $(type -p $HOMEBREW_CURL)"

@HariSekhon
Copy link
Contributor Author

I'll just either disable the use of Homebrew on those older CI builds or do some kind of tarball install workaround to a newer version...

@MikeMcQuaid
Copy link
Member

Thanks for reporting back. Note: it's likely that builds will fail on those lower versions.

@HariSekhon
Copy link
Contributor Author

Thanks for the note, I've added an exception to not install Homebrew on CI builds where curl < 7.41, I had already had some exceptions to skip older versions of CentOS/RHEL and Alpine for similar reasons.

I appreciate your feedback, I'm aware we are all too stretched for time when it comes to open source vs our day jobs.

@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants