I am trying to install homebrew using the command:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
When I do this I get.
It appears Homebrew is already installed. If your intent is to
reinstall you should do the following before running this installer
again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
So I run a
which brew
and I get nothing, just a new line.
I don't want to delete my usr/local.git because there is a lot in my directory. and the
/usr/local/Cellar Doesn't exist and when I cd into /usr/local there is no brew to be found... Which is due to the simlink I'm sure.
Anytime I run a Brew command of some sort I get
brew: command not found
I can't figure out what I am missing here. Any clues? I have search for over an hour and can't find any trace of it, even though the install says it does.
Thoughts?
Related
Trying to install mongodb server on my mac using Brew but getting this error.
Updated my brew to latest version, still egtting this error.
Command i used:
brew install mongodb-community#6.0
I figured it out myself. Here is the solution which I found out. I am using mac os on intel processor.
I first run
rm -fr $(brew --repo homebrew/core)
then
brew tap homebrew/core
then
brew tap mongodb/brew
then installed it
brew install mongodb-community#6.0
This worked for me.
I am trying to install pods for my project, but it fails with this error
[!] /bin/bash -c
set -e
sh build.sh cocoapods-setup
WARNING: The active Xcode command line tools, as returned by 'xcode-select -p', are not from Xcode.
The newest version of Xcode will be used instead.
Print: Entry, ":CFBundleVersion", Does Not Exist
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
This will install the command line tools.
You can also get it from here:
Apple Downloads and install it.
I have been trying to install cocoapods but I keep getting an error. I have tried the following commands and get the same result.
sudo gem install cocoapods
sudo gem install -n /usr/local/bin cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20200726-37338-rvqxhv.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.13.1/gem_make.out
After a lot of searching I finally came across a solution that I believe works. If you are use Mac OS Catalina you need to use Brew.
Open Terminal on your Mac.
Now, run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
Install cocoapods using brew
brew install cocoapods
cocoapods is ready to use now!
When installing PostgreSQL via Homebrew on Mac (OSX 10.11.6) I get the following errors:
Error: The `brew link` step did not complete successfully The formula
built, but is not symlinked into /usr/local
and
initdb: file "/usr/local/share/postgresql/postgres.bki" does not exist
This might mean you have a corrupted installation or identified the
wrong directory with the invocation option -L.
The /postgresql folder doesn't exist.
Not sure if it's relevant, but I already have OpenSSL 1.0.2o_2 and Readline 7.0.5 installed via Homebrew.
Does anyone know why this error occurs and how I can solve it?
In my case, I had installed libpq which prevented postgresql from linking. Unlinking libpq followed by linking postgresql fixed the issue for me.
brew unlink libpq
brew link postgresql
brew postinstall postgresql
Managed to solve the problem. It's a permissions issue. The original answer can be found here: Homebrew: Could not symlink, /usr/local/bin is not writable
In short, perform the following commands:
sudo chown -R `whoami`:admin /usr/local/bin
sudo chown -R `whoami`:admin /usr/local/share
sudo chown -R `whoami`:admin /usr/local/opt
I am trying to install homebrew according to the guidelines described in here.
I have curl and rvm, and want to install rails 1.9.3 on my lion 1.7.4 with Xcode 4.3.2 and with developer command line tools installed.
It seems I will need libksba, which requires me to use to command brew install libksba.
So I will need Home Brew.
I follow the instructions and use
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
which outputs the following:
$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/Formula/...
/usr/local/Library/Homebrew/...
Press enter to continue
==> Downloading and Installing Homebrew...
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
[~]$
[~]$
[~]$ brew doctor
/usr/local/Library/Homebrew/tab.rb:1:in `require': no such file to load -- ostruct `(LoadError)`
from /usr/local/Library/Homebrew/tab.rb:1
from /usr/local/Library/Homebrew/bottles.rb:1:in `require'
from /usr/local/Library/Homebrew/bottles.rb:1
from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `require'
from /usr/local/Library/Homebrew/extend/pathname.rb:2
from /usr/local/Library/Homebrew/global.rb:1:in `require'
from /usr/local/Library/Homebrew/global.rb:1
from /usr/local/bin/brew:10:in `require'
from /usr/local/bin/brew:10
[~]$
So this means basically that brew was not installed right. Do I have to change the path at which it is looking for? I used to have MacPorts in, which I completely erased so there should be no conflicts there. Please help!!! Thanks a lot! It's an awesome community.
UPDATE:
I time machined back a year because I thought I did something critically wrong. Now I still have an issue installing, but it seems a bit more common.
I installed homebrew using
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Any command of "brew" gives me this error:
[~]$ brew
/usr/local/bin/brew:6:in `require': no such file to load -- pathname (LoadError)
from /usr/local/bin/brew:6
Any suggestions? Thank you all!
I had the same problem as mentioned in my comment above. To resolve it I ended up having to restore my default system ruby. I am on SnowLeopard - OSX 10.6.8, so your resources may vary, but what I did was:
uninstall xcode: sudo /Developer/Library/uninstall-devtools --mode=all
rsync or copy /System/Library/Frameworks/Ruby.framework from another machine running 10.6.8
You also need the ruby executables in /usr/bin to point to the system Ruby: /usr/bin/{erb,gem,irb,rdoc,ri,ruby,testrb}
these are just symlinks to /System/Library/Frameworks/Ruby.framework
erb -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb
so I re-symlinked them, for example from /usr/bin: sudo ln -s ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb ./erb
the brew executable currently uses /usr/bin/ruby so that needs to be there in the least
I hear future versions of brew will point directly at the system ruby on the /System/Library/Frameworks/Ruby.framework path, so symlinking ruby to a custom install is a bad idea
At this point brew commands worked again and ostruct (part of ruby standard lib) was again found. I went ahead and added xcode back in and worked through some minor 'brew doctor' errors.
I have now replaced all my old macports packages with homebrew packages and its such an improvement!