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

brew not using newer curl (or git) in PATH, complains that it is an old version #13071

Closed
2 tasks done
newearthmartin opened this issue Mar 30, 2022 · 4 comments
Closed
2 tasks done
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@newearthmartin
Copy link

brew config output

Error: Please update your system curl.
Minimum required version: 7.41.0
Your curl version: 7.29.0
Your curl executable:
Error: Please update your system Git.
Minimum required version: 2.7.0
Your Git version: 1.8.3.1
Your Git executable: /usr/bin/git
HOMEBREW_VERSION: >=2.5.0 (shallow or no git repository)
ORIGIN: https://github.com/Homebrew/brew
HEAD: 75db06d8f204d49a6d9d7c325e5c459e89f6c818
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 36f9cb671e40866cbb72bb055b141ba8dc29eb23
Core tap last commit: 2 days ago
Core tap branch: master
HOMEBREW_PREFIX: /home/multilanguage/.linuxbrew
HOMEBREW_REPOSITORY: /home/multilanguage/.linuxbrew/Homebrew
HOMEBREW_CELLAR: /home/multilanguage/.linuxbrew/Cellar
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 64
HOMEBREW_TEMP: /home/multilanguage/tmp
Homebrew Ruby: 2.6.5 => /usr/bin/ruby
CPU: 64-core 64-bit skylake
Clang: N/A
Git: 1.8.3.1 => /bin/git
Curl: 7.29.0 => /bin/curl
Kernel: Linux 3.10.0-1160.49.1.el7.x86_64 x86_64 GNU/Linux
OS: CentOS Linux release 7.9.2009 (Core)
Host glibc: 2.17
/usr/bin/gcc: 4.8.5
/usr/bin/ruby: 2.6.5
glibc: N/A
gcc@5: N/A
xorg: N/A

brew doctor output

Error: Please update your system curl.
Minimum required version: 7.41.0
Your curl version: 7.29.0
Your curl executable:
Error: Please update your system Git.
Minimum required version: 2.7.0
Your Git version: 1.8.3.1
Your Git executable: /usr/bin/git
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /home/multilanguage/opt/bin/curl-config
  /home/multilanguage/miniconda3/bin/python3-config
  /home/multilanguage/miniconda3/bin/ncursesw6-config
  /home/multilanguage/miniconda3/bin/python3.8-config
  /home/multilanguage/miniconda3/bin/curl-config
  /home/multilanguage/miniconda3/bin/krb5-config

Warning: An outdated version (1.8.3.1) of Git was detected in your PATH.
Git 2.7.0 or newer is required for Homebrew.
Please upgrade:
  brew install git

Warning: Your Homebrew's prefix is not /home/linuxbrew/.linuxbrew.
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/home/linuxbrew/.linuxbrew).
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
unsupported configuration.

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

I'm trying to fix warnings in brew doctor. I already installed newer versions of git and curl and they are in my PATH, but brew still complains that I have old versions of these programs.

What happened (include all command output)?

You can see I have the latest curl and git:

$ which curl
~/opt/bin/curl

$ curl --version
curl 7.82.0 ...

$ which git
~/opt/bin/git

$ git --version
git version 2.9.5

brew config is hardcoded on

Git: 1.8.3.1 => /bin/git
Curl: 7.29.0 => /bin/curl

Why? How to change them?

What did you expect to happen?

I expect brew to use git and curl from PATH or to let me change the paths where to find them.

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

Install newer versions of git and curl in the PATH.
See that brew is still using /bin/git and /bin/curl in brew config.
@newearthmartin newearthmartin added the bug Reproducible Homebrew/brew bug label Mar 30, 2022
@MikeMcQuaid
Copy link
Member

We don't use the versions from your PATH, only the versions in /usr/bin or those installed by Homebrew.

@newearthmartin
Copy link
Author

newearthmartin commented Mar 31, 2022

I choose Brew because it lets me install packages in my local home directory. I don't have root access to use apt or yum, so I do not have root access to update the curl and git in /usr/bin.

Choosing to not allow for using other, more up-to-date git and curl is making brew useless. Same for the requirement to create a linuxbrew user for some bottle. Again, this makes Brew useless for users without root access, since that also means they can't create new users.

Please reconsider these policies.

@newearthmartin
Copy link
Author

I did find that I can use

export HOMEBREW_CURL_PATH=~/opt/bin/curl
export HOMEBREW_GIT_PATH=~/opt/bin/git

but they only work in developer mode

export HOMEBREW_DEVELOPER=1

Setting another path for git and curl is a normal use case, so why make it only for developer mode?

Also, this was incredibly hard to find after hours of googling. Please add some clear documentation about this.

@github-actions github-actions bot added the outdated PR was locked due to age label May 1, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2022
@MikeMcQuaid
Copy link
Member

Also, this was incredibly hard to find after hours of googling. Please add some clear documentation about this.

Created a PR to propose adding in #13423

Same for the requirement to create a linuxbrew user for some bottle.

We require a fixed location for bottles and this seems to be the optimal location we've found.

Again, this makes Brew useless for users without root access, since that also means they can't create new users.

You can ask someone with root access to create this user for you, though, making it not useless.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

2 participants