Questions tagged [homebrew]

Homebrew is a package manager for macOS and Linux that provides an easy interface to install many packages. It has been built to play nicely with your existing system and not interfere with it. It has been built entirely on top of Git and Ruby and is easily customized to suit your needs. Debugging help with Homebrew should at the very least include details of the output of `brew doctor`.

Homebrew is a package manager for and . It can be installed by following the instructions on its website.

It provides an easy interface to install many packages. A list of the available packages is online. Alternatively you can use the search feature to find the name of a package.

$ brew search vim
macvim                 vim        vimpc
pacvim                 vimpager
Caskroom/cask/macvim              Caskroom/cask/vimr

Installation is as easy as

$ brew install macvim

and Homebrew will take care of installing all of the necessary dependencies.

Debugging Homebrew Issues

Homebrew has very good documentation on debugging issues you may have. The key to it all is the brew doctor command which will check for any potential issues your system may have.

Homebrew Documentation

Homebrew contains a lot of documentation including an FAQ and Tips N' Tricks section.

There is also offline support available via the man brew and brew help commands.

Homebrew Manual

More information on all of the functions of brew is available via the Terminal with:

$ man brew

...or brew help, which will provide a brief overview of some of the more common functions available:

Example usage:
  brew search [TEXT|/REGEX/]
  brew info [FORMULA...]
  brew install FORMULA...
  brew update
  brew upgrade [FORMULA...]
  brew uninstall FORMULA...
  brew list [FORMULA...]

Troubleshooting:
  brew config
  brew doctor
  brew install --verbose --debug FORMULA

Contributing:
  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]
  brew bump-formula-pr [FORMULA...]

Further help:
  brew commands
  brew help [COMMAND]
  man brew
  https://docs.brew.sh
6877 questions
180
votes
7 answers

How can I brew link a specific version?

I have a few kegs of the same package in /usr/local/Cellar/libfoo like /usr/local/Cellar/libfoo/1.0.1, /usr/local/Cellar/libfoo/HEAD and /usr/local/Cellar/libfoo/mycopy How can I brew link to a specific version?
jrwren
  • 17,465
  • 8
  • 35
  • 56
174
votes
13 answers

Installing R with Homebrew

I'm trying to install R using Homebrew. I ran these commands which are recommended elsewhere on SO: brew tap homebrew/science brew install R For brew tap homebrew/science, I'm receiving this error: Error: Already tapped! For the second command, I…
duber
  • 2,769
  • 4
  • 24
  • 32
172
votes
15 answers

Homebrew refusing to link OpenSSL

I'm on: OSX 10.11.6, Homebrew version 0.9.9m OpenSSL 0.9.8zg 14 July 2015 I'm trying to play with with dotnetcore and by following their instructions, I've upgraded/installed the latest version of openssl: > brew install openssl ==> Downloading…
daviddeath
  • 2,483
  • 2
  • 17
  • 16
171
votes
5 answers

Easy way to have Homebrew list all package dependencies

Is there anyway to have the command brew show all the installed or optional dependencies for any given package? It would also be helpful to see which of the install packages are themselves the dependencies of others packages.
oliver
  • 2,467
  • 3
  • 14
  • 29
171
votes
5 answers

How do you install ssh-copy-id on a Mac?

I am having trouble trying to install ssh-copy-id on my Mac. I have tried to follow https://github.com/beautifulcode/ssh-copy-id-for-OSX but every time I run ssh-copy-id it gives me errors. Any ideas on how to get ssh-copy-id to install?
Technic1an
  • 2,697
  • 5
  • 20
  • 22
170
votes
11 answers

PDFtk Server on OS X 10.11

I've been using PDFTK Server on OSX pre 10.11 for over a year without any issues running commands on the command line. After installing OSX 10.11 beta, I can no longer run any PDFTK Server commands on the command line. It does not throw any error,…
Aaron
  • 3,068
  • 2
  • 21
  • 44
168
votes
9 answers

Another active Homebrew process is already in progress

When I try to do this: brew install node I get this message: /usr/local/Homebrew/Library/Homebrew/utils/lock.sh: line 19: /usr/local/var/homebrew/locks/update: Permission denied -e:1:in `initialize': Bad file descriptor (Errno::EBADF) from…
akaliza
  • 3,641
  • 6
  • 24
  • 31
168
votes
4 answers

brew install gcc too time consuming

I'm doing a clean install of Mavericks, and accidentally did brew install gcc which is taking over half an hour, maybe more. Should I terminate it? I know now that I should have installed a specific gcc (maybe gcc48) but it's too late and my…
ehacinom
  • 8,070
  • 7
  • 43
  • 65
165
votes
22 answers

Cannot connect to Postgres server running through brew services

I've been looking for a solution for this and could not find a working solution. I've installed postgres using brew (brew install postgres) in my MacBook and I am currently running it using brew services (brew services list displays postgres as a…
leo.fcx
  • 6,137
  • 2
  • 21
  • 37
165
votes
10 answers

Homebrew installs nvm but nvm can't be found afterwards?

I'm using homebrew and oh-my-zsh on a fresh OSX 10.10.1 install. I got nvm via homebrew and then attempted to run it but says - zsh: command not found: nvm Any idea what the problem is? I was able to install and use git just fine... UPDATED…
Dayan
  • 7,634
  • 11
  • 49
  • 76
165
votes
21 answers

How to tell if homebrew is installed on Mac OS X

I am doing some Rails programming and I consistently see Homebrew referenced in solutions around the web but have never used it. I also notice Homebrew in the terminal version 2.9 as an option next to "Shell -> New" from the terminal drop down but…
Kmb40
  • 2,341
  • 3
  • 18
  • 14
162
votes
5 answers

How to modify PATH for Homebrew?

Trying to install ruby 1.9.3, read that I need to install homebrew first. Ran brew doctor, and it's giving me a bunch of warnings. One of which is: Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be…
mrdavidjcole
  • 1,862
  • 3
  • 15
  • 14
160
votes
8 answers

How can I install a previous version of Python 3 in macOS using homebrew?

How can I install a previous version of Python 3 in macOS using brew? With the command brew install python I got the latest version of Python 3 (currently v3.7.0), but I want the last version of Python 3.6 (currently 3.6.5). I have read about…
ePi272314
  • 12,557
  • 5
  • 50
  • 36
156
votes
4 answers

Homebrew: List only installed top level formulas

I'm looking for a way to show only the formulas I installed without the installed dependencies. I want to have a list of all the programs I actually installed, without all noise of the dependencies. I do know about brew list which lists all…
user524824
154
votes
8 answers

How to brew install java?

I'd like to setup java on a new OS X machine, and prefer to use brew for OS X package management. How can I install latest java using brew?
Tim Fulmer
  • 14,970
  • 7
  • 28
  • 34