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
153
votes
9 answers

How can I use Homebrew to install both Python 2 and 3 on Mac?

I need to be able to switch back and forth between Python 2 and 3. How do I do that using Homebrew as I don't want to mess with path and get into trouble. Right now I have 2.7 installed through Homebrew.
MostafaMV
  • 2,181
  • 3
  • 16
  • 22
151
votes
23 answers

PostgreSQL error 'Could not connect to server: No such file or directory'

Like some others I am getting this error when I run rake db:migrate in my project or even try most database tasks for my Ruby on Rails 3.2 applications. PGError (could not connect to server: No such file or directory. Is the server running…
Evolve
  • 8,939
  • 12
  • 51
  • 63
150
votes
9 answers

Installing MongoDB with Homebrew

I'm relatively new to MongoDB and am trying to install MongoDB on my Mac with Homebrew, but I'm getting the following error: Error: No available formula with the name "mongodb" ==> Searching for a previously deleted formula (in the last…
Paul Vu
  • 1,603
  • 2
  • 7
  • 6
150
votes
9 answers

Upgrade terraform to specific version

Use case I have installed Terraform v0.11.13 via homebrew and as recommended by terraform I want to ugprade to version v0.11.14 before doing the major upgrade to v0.12.0. The problem When I run brew upgrade terraform or download the Mac package from…
kentor
  • 16,553
  • 20
  • 86
  • 144
148
votes
1 answer

Understand homebrew and keg-only dependencies

I've recently started using homebrew, and I'm a bit confused as to what happens when I brew something onto my system, but its brewed dependencies are keg-only, meaning that they are linked under /usr/local. For example, I'm install vips (an image…
cgat
  • 3,689
  • 4
  • 24
  • 38
147
votes
1 answer

nginx the "ssl" directive is deprecated, use the "listen ... ssl"

After NGINX upgrade to v1.15.2 starts getting the warning. nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/etc/nginx/sites-enabled/confid-file-name:8 Where the 8th line is ssl on; how I can…
sambua
  • 2,274
  • 3
  • 22
  • 20
144
votes
7 answers

Error: php@7.3 has been disabled because it is a versioned formula

I try to install php@7.3 using brew. But, it return error because it is versioned formula. What is it? command: brew install php@7.3 result: Error: php@7.3 has been disabled because it is a versioned formula!
Elbo Shindi Pangestu
  • 2,021
  • 2
  • 12
  • 24
142
votes
2 answers

List all files in a homebrew package

How can I get homebrew to list out all files installed for a package? For example, when I run brew list for the exim package, I get these files: $ brew list…
Hanxue
  • 12,243
  • 18
  • 88
  • 130
141
votes
22 answers

env: node: No such file or directory in mac

I'm searching it in google on how to show the version of node js or how I'm gonna work with npm? If I do this npm -v even I already install it using brew install node. The result is always env: node: No such file or directory I already do a lot…
user3818576
  • 2,979
  • 8
  • 37
  • 62
141
votes
26 answers

Can't connect to local MySQL server through socket homebrew

I recently tried installing MySQL with homebrew (brew install mysql) and when I try to run it I get the following error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) There is no /tmp/mysql.sock nor a…
girlcode
  • 3,155
  • 5
  • 27
  • 41
139
votes
11 answers

can't chown /usr/local for homebrew in Mac OS X 10.13 High Sierra

Homebrew needs permissions in /usr/local and since no one else uses my laptop I have always simply done sudo chown -R $(whoami) $(brew --prefix) but in High Sierra, this gives chown: /usr/local: Operation not permitted What is the fix?
Dan
  • 2,851
  • 3
  • 20
  • 27
139
votes
15 answers

Octave-Gnuplot-AquaTerm error: set terminal aqua enhanced title "Figure 1"...unknown terminal type"

I've installed Octave and gnuplot via Homebrew, and downloaded AquaTerm.dmg. When I try to plot, I get the following message: octave:4> plot(x,y) gnuplot> set terminal aqua enhanced title "Figure 1" font "*,6" ^ `line 0:…
PGreen
  • 3,239
  • 3
  • 24
  • 29
138
votes
8 answers

Where do I find the bashrc file on Mac?

Hello I am following this page.. I'm installing Python onto my mac so that I can set up a Django / Eclipse development environment. However I am not too sure how to go about executing this step: The script will explain what changes it will make…
pencilVester
  • 1,391
  • 2
  • 9
  • 4
135
votes
8 answers

What is the best/safest way to reinstall Homebrew?

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…
AndrewKS
  • 3,603
  • 2
  • 24
  • 33
133
votes
5 answers

How can I see the current value of my $PATH variable on OS X?

$ $PATH returns: -bash:…
Karoh
  • 2,390
  • 3
  • 23
  • 29