Homebrew installation in mac is giving error
Asked Answered
D

3

5

I want to install homebrew on my mac system but i am not able to install. Installation process is giving me error.

error: could not lock config file /usr/local/Homebrew/.git/config: Permission denied
fatal: could not set 'core.repositoryformatversion' to '0'
Failed during: git init -q

I have tried below command to install homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Daniels answered 17/5, 2019 at 6:38 Comment(0)
C
23

Remove the current installation with:

sudo rm -rf /usr/local/Homebrew

and install it again without using sudo:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Covered answered 17/5, 2019 at 15:44 Comment(0)
T
3

the location have change so now use this :

sudo rm -rf /opt/homebrew

and install again with :

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Tanker answered 23/10, 2021 at 16:18 Comment(0)
R
1

Remove Homebrew Directory:

sudo rm -rf /usr/local/Homebrew
rm -rf ~/.homebrew

Clone Homebrew using the SSH link:

git clone [email protected]:Homebrew/brew.git ~/.homebrew

Add Homebrew to your PATH:

echo 'export PATH="$HOME/.homebrew/bin:$PATH"' >> ~/.bash_profile

Source your profile to update the PATH:

source ~/.bash_profile

Check if Homebrew is installed:

brew --version
Rhebarhee answered 3/9 at 8:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.