Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew installation in mac is giving error

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)"
like image 925
Amrit Avatar asked Nov 28 '22 21:11

Amrit


2 Answers

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)"
like image 118
Ortomala Lokni Avatar answered Dec 05 '22 20:12

Ortomala Lokni


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)"
like image 45
TooikLeChevalier Avatar answered Dec 05 '22 20:12

TooikLeChevalier