Reputation: 301
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)"
Upvotes: 5
Views: 11194
Reputation: 11
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
Upvotes: 1
Reputation: 41
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)"
Upvotes: 3
Reputation: 62456
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)"
Upvotes: 23