I don't have much knowledge of all this so please forgive my incompetence. When I run brew update
, it shows:
fatal: Unable to create '/usr/local/Library/Taps/homebrew-science/.git/index.lock': Permission denied
Error: Failed to update tap: homebrew/science
Already up-to-date.
But, when I do sudo brew update
, it says:
bash-3.2$ sudo brew update
Password:
Already up-to-date.
Why does it flag the fatal warning when I run the command without sudo
? FYI, to provide some context I am trying to install Octave regarding which I need to run brew tap homebrew/science
.
Please let me know how should I fix this. If possible, kindly provide a link to a page/article where I can understand the reason for the warning.