Installing brew with OS X issue - ruby

When I try to install brew with the command
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
I get the following error
/Users/nouveau/.rbenv/shims/ruby: ligne21: /usr/local/Cellar/rbenv/0.4.0/libexec/rbenv: No such file or directory
How can I solve this?

Your rbenv installation seems to be broken. Just remove it:
cd
rm -rf rbenv
rm -rf /usr/local/Cellar
exit # close terminal
Then repeat homebrew installation (with your system Ruby):
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Related

Brew stops working after terminal session is closed

I have installed Brew in MACOS Monterey with the following commands.
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
chmod -R go-w "$(brew --prefix)/share/zsh"
I have tested it after the install, and it works, however closing the terminal session and opening it again causes terminal to say that the command brew is not found after running it. I can still see the homebrew directory, so Im guessing its in the wrong place for terminal to run it.
The only supported method to install brew is found on brew.sh:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Ok I was able to fix the issue by adding the PATH to the .bash_profile file.

Need sudo access on macOS - Installing Hashcat through Brew

I am trying to install Hashcat using the instructions on Brew: https://brewinstall.org/install-hashcat-on-mac-with-brew/
When I enter the first command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
on terminal, it says:
Need sudo access on macOS (e.g. the user myname to be an Administrator)!
However, I am already an administrator when I check in Users&Groups in Systems Preferences. Typing sudo whoami also gives me back root
Can someone please help me out with this?
I'm pretty sure all you have to do is add sudo in front of the command like this:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

Installing HomeBrew doesn't work on Mojave

I type in Terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and I get back
illegal variable name
Any recommendations?
Maybe this is the same issue? https://discourse.brew.sh/t/illegal-variable-name-error-mac-high-sierra/3361/2.
could you run bash before pasting /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" there?
Simply open the terminal. Write the command as
bash
and press Enter button. Paste the same command as -
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installing Homebrew on Macbook running El Capitan

When I run this command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
I get the following error:
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
The current contents of /usr/local are bin CODEOFCONDUCT.md git include lib libexec Library LICENSE.txt n share var .git .github .gitignore
However, when I run brew doctor, this error is thrown:
bash: brew: command not found
And when I try to un-install Homebrew using this script:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
my command prompt responds with:
Failed to locate Homebrew!
Please help.
First delete all homebrew files manually. Then reinstall Homebrew from scratch. Prefix sudo at your own discretion:
# packages
rm -rf /usr/local/Cellar
# executable
rm /usr/local/bin/brew
# meta
rm -rf /usr/local/.git
rm /usr/local/.github
rm /usr/local/.gitignore
rm /usr/local/.travis.yml
rm /usr/local/.yardopts
rm /usr/local/CODEOFCONDUCT.md
rm /usr/local/LICENSE.txt
rm /usr/local/README.md
# home
rm ~/.rvm/bin/brew
rm ~/.homebrew
rm -rf ~/Library/Caches/Homebrew
rm -rf ~/Library/Logs/Homebrew
# other
rm -rf /Library/Caches/Homebrew
# find more files to delete; delete Homebrew files only!
find / -name "*brew*"
IMPORTANT: because of permission errors upon reinstall, you may have to do one of the following steps before reinstallation; see: https://github.com/Homebrew/legacy-homebrew/issues/15138
# via: https://github.com/Homebrew/legacy-homebrew/issues/15138#issuecomment-19258042
cd /usr/local
sudo mv -v Library Library.old
# --OR--
# via: https://github.com/Homebrew/legacy-homebrew/issues/15138#issuecomment-33338868
# see: http://linuxcommand.org/man_pages/chmod1.html
cd /usr/local
chmod -R 775 Library
Reinstall Homebrew; see: http://brew.sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
There is a problem related to the latest version of XCode and Homebrew. Open a terminal and run:
rm -rf /usr/local/Cellar /usr/local/.git
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If you get permission denied error use sudo. Directory /usr/local/Cellar/ is completely removed when uninstalling Homebrew, so it is safe to remove it.

Trouble Installing Homebrew on Mac

I am having trouble installing Homebrew on a mac. I am running Mac OS X 10.8.4.
When I try to install it through
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Or:
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
I get:
\-bash: curl: command not found
-bash: ruby: command not found
I have also tried:
cd /usr/local/bin
mkdir homebrew && curl -L https://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew
And got:
-bash: mkdir: command not found
What do you think may be wrong>

Resources