I am trying to install the Homebrew throwgh following command in Terminal:
brew install jenkins-lts
but the result is: -bash: brew: command not found
what is your recommendation
Sounds like you havent got brew installed, please run the following in a terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
There is further install guidance here: https://docs.brew.sh/Installation if required
I installed homebrew today. And I did something wrong so that my homebrew can't work now. Since I use an arm based mac, I am hard to find solution to uninstall my homebrew which installed in /opt/homebrew/.
To uninstall Homebrew, run the uninstall script from the Homebrew/install repository.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Download the uninstall script and run /bin/bash uninstall.sh --help to view more uninstall options.
Make sure your homebrew path is correct and then run the script:
echo $HOMEBREW_PREFIX #=> /opt/homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
See: https://github.com/homebrew/install#uninstall-homebrew
Im trying to install rsync on macOS high sierra using Brew :
brew install rsync
But i got this error :
Error: Could not create /usr/local/Cellar <br>
Check you have permission to write to /usr/local
You need just to uninstall and reinstall brew on your mac:
Before that execute to below command:
brew bundle dump
After that execute
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
I am getting issues with permissions in Homebrew: After I installed Node and tried to install npm using the curl command Homebrew tells you to use, it would fail due to EACCESS errors. I checked the node folder and the permissions were a) unowned by a user (I had to chown it) and b) Had no write permissions (I had to chmod 755 it).
I've fixed the issue with NPM, but I had to run its install script as sudo (which is bad!).
I assume I must have installed Homebrew as root or something similar. I am hoping that reinstallation will fix it, but I can't find a source on how to reinstall Homebrew.
When I rerun the installer in Terminal I get:
/usr/local/.git already exists!
Update 10/11/2020 to reflect the latest brew changes.
Brew already provide a command to uninstall itself (this will remove everything you installed with Homebrew):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
If you failed to run this command due to permission (like run as second user), run again with sudo
Then you can install again:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Process is to clean up and then reinstall with the following commands:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"
Notes:
Always check curl | bash (or ruby) commands before running them
http://brew.sh/ (for installation notes)
https://raw.githubusercontent.com/Homebrew/install/master/install (for clean up notes, see "Homebrew is already installed")
Try running the command
brew doctor
and let us know what sort of output you get
edit: And to answer the title question, this is from their FAQ :
Homebrew doesn’t write files outside its prefix. So generally you can
just rm -rf the folder you installed it in.
So following that up with a clean re-install (following their latest recommended steps) should be your best bet.
For Mac OS X Mojave and above
To Uninstall Homebrew, run following command:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
To Install Homebrew, run following command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
And if you run into Permission denied issue, try running this command followed by install command again:
sudo chown -R $(whoami):admin /usr/local/* && sudo chmod -R g+rwx /usr/local/*
The way to reinstall Homebrew is completely remove it and start over. The Homebrew FAQ has a link to a shell script to uninstall homebrew.
If the only thing you've installed in /usr/local is homebrew itself, you can just rm -rf /usr/local/* /usr/local/.git to clear it out. But /usr/local/ is the standard Unix directory for all extra binaries, not just Homebrew, so you may have other things installed there. In that case uninstall_homebrew.sh is a better bet. It is careful to only remove homebrew's files and leave the rest alone.
For me, I need to do the below steps to re-install the brew from scratch.
sudo rm -rf /usr/local/Cellar/
brew cleanup
sudo rm -rf $(brew --repo)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
You can try this method for M1 macbook
After you
1.Uninstall brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
2.Install brew again
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
3.You brew install something in image I "brew install sonar-scanner"
then error log show same this
Error: No similarly named formulae found.
4.You should try follow run this.
rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
5.When no.4 is done run this
brew tap homebrew/core
try brew install again.
For me, this one worked without the sudo access.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
For more reference, please follow
https://gist.github.com/mxcl/323731
I have tried multiple times. Can anybody tell me exact detailed steps?
My mac os is 10.6.8.
It complains about some missing packages.
Use this to install on Mac OSX 10.6.8
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Open terminal (shortcut : Press cmd + space and enter terminal in spotlight search)
Enter command /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Now you’ll be asked to enter password (note : passwords are not visible)
If you get permission error as below
fatal: cannot copy '/Library/Developer/CommandLineTools/usr/share/git-core/templates/hooks/pre-receive.sample' to '/usr/local/Homebrew/.git/hooks/pre-receive.sample': Permission denied
Failed during: git init -q
Enter command sudo chown -R $(whoami) $(brew --prefix)/*
Now you’ll be asked to enter password
Again enter the same command written in step 2 (shortcut : simply press top arrow button)
Wait patiently for sometime. You’ll see installation successful after a while.
Thereafter if you need any help regarding brew then simply enter brew help command. Refer this link for additional details.
brew.sh (the official home page) always has the most up-to-date installation instructions.
I got it working now following command /usr/bin/ruby -e "$(curl -fsSL raw.github.com/gist/323731)".
I was running the mkdir homebrew && curl -L github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew I have no idea what the two are doing though
This are my results on OSX 1068:
ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin10.0]
brew -v
Homebrew 1.3.4
Homebrew/homebrew-core (git revision 897df; last commit 2017-10-06)
And after:
brew update
brew -v
Homebrew 1.3.5
Homebrew/homebrew-core (git revision 713fe; last commit 2017-10-15)
npm -v
5.4.2
and doing:
sudo npm install npm#latest -g
sudo npm i -g npm
npm -v
5.5.1
node -v
v6.9.5
And after:
brew upgrade node