Linuxbrew / install

đź’€ Linuxbrew/install (deprecated)
https://docs.brew.sh/Homebrew-on-Linux
BSD 2-Clause "Simplified" License
43 stars 42 forks source link

Error: Git must be installed and in your PATH! #51

Closed x80486 closed 5 years ago

x80486 commented 5 years ago

I tried to install Linuxbrew and I got the error from this issue's title. I didn't have Ruby, but the installer took care of it:

[x80486@uplink ~]$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" 
[sudo] password for x80486: 
==> Installing Ruby to /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 26.9M  100 26.9M    0     0  2624k      0  0:00:10  0:00:10 --:--:-- 2612k
==> Installing successful
...
HEAD is now at 117c24f4b Merge pull request #5756 from MikeMcQuaid/update-untap
Error: Git must be installed and in your PATH!
Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force

I think the same should happens for git since it's a dependency, or am I missing something?

sjackman commented 5 years ago

It's meant to use curl as a fallback if you don't have git available. Though that functionality does not seem to be working, which is a bug.

Try running…

/home/linuxbrew/.linuxbrew/bin/brew install git
brew update

or if that fails…

HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install git
brew update
fanghuaqi commented 4 years ago

@x80486 @sjackman I met the same issue when I tried to follow the guide here: https://docs.brew.sh/Homebrew-on-Linux#install.

* [new tag]         2.1.5      -> 2.1.5
 * [new tag]         2.1.6      -> 2.1.6
 * [new tag]         2.1.7      -> 2.1.7
 * [new tag]         2.1.8      -> 2.1.8
 * [new tag]         2.1.9      -> 2.1.9
HEAD is now at e6cfb4a Merge pull request #6629 from timsly/manpage-artifact
==> Downloading https://linuxbrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
Already downloaded: /home/hqfang/.cache/Homebrew/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
==> Pouring portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
Error: Git is unavailable
Error: Failure while executing; `/home/hqfang/.linuxbrew/bin/brew tap homebrew/core` exited with 1.
Error: Git must be installed and in your PATH!
Failed during: /home/hqfang/.linuxbrew/bin/brew update --force

As I can see, I have already have git installed, but it still complain about git, why that happened?

$ which git
/usr/local/git/bin/git

And I also tried to use brew doctor and brew install git, it doesn't help. Could you show me some hints on how to make it work on linux?

Thanks in advance

fanghuaqi commented 4 years ago

The suggested commands above failed for me:

$ HOMEBREW_NO_AUTO_UPDATE=1 brew install git
Error: Git is unavailable
Error: Failure while executing; `/home/hqfang/.linuxbrew/bin/brew tap homebrew/core` exited with 1.
sjackman commented 4 years ago

Try…

HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_ENV_FILTERING=1 brew install git