Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like using Homebrew for installing Unix software on my Mac, and appreciate that it doesn't try to install multiple copies of things like Python. There are some packages I've already installed manually, though, and I don't want Homebrew to install its own copies of them.

In my current situation, I installed OCaml using the standard installer. Now I want to install Coq via Homebrew. I see via brew deps coq that it depends on OCaml. I know I can tell it to skip installing OCaml this time via brew install --ignore-dependencies coq. However, I'd rather not have to do that every time I install a Homebrew package that requires OCaml.

How can I make Homebrew pretend that it installed software that I installed through other means, so that it doesn't try to install a duplicate copy?

share|improve this question
up vote 9 down vote accepted

Take the path that you used for --prefix= during your ./configure and sym-link that into the Cellar/ directory that Homebrew is using. Homebrew will see these directories and see the dependencies as satisfied (unless you need to have them compiled with or without certain features to make Homebrew's formulas compile correctly). If your manually-compiled deps aren't compiled correctly, you'll probably get errors out of Homebrew.

ln -s /path/from/prefix/ /usr/local/Cellar/path/from/prefix

(Note the trailing slash on the first path, and lack of trailing slash on the second. OS X can be picky about these slashes when creating sym-links.)

This is the wrong way to do it, you should just be using --ignore-dependencies coq — that's what it's there for.

share|improve this answer
Nice answer of what was asked, but also a pointer to the recommended way to suppress certain dependencies. – bmike Sep 28 '11 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.