Following this post I installed brew and then reinstalled ocaml to include graphics:
/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/i
In general, homebrew puts all its binaries, libraries and settings in /usr/local/Cellar/PACKAGENAME/VERSIONNUMBER
but it also creates symbolic links in /usr/local/bin
that point to the latest package/version.
So, if you look at my /usr/local/bin
you will see:
ls -l /usr/local/bin
Output
lrwxr-xr-x 1 mark admin 26 30 Jan 2016 ack -> ../Cellar/ack/2.14/bin/ack
lrwxr-xr-x 1 mark admin 43 11 Oct 13:30 amqp-consume -> ../Cellar/rabbitmq-c/0.8.0/bin/amqp-consume
lrwxr-xr-x 1 mark admin 49 11 Oct 13:30 amqp-declare-queue -> ../Cellar/rabbitmq-c/0.8.0/bin/amqp-declare-queue
lrwxr-xr-x 1 mark admin 48 11 Oct 13:30 amqp-delete-queue -> ../Cellar/rabbitmq-c/0.8.0/bin/amqp-delete-queue
lrwxr-xr-x 1 mark admin 39 11 Oct 13:30 amqp-get -> ../Cellar/rabbitmq-c/0.8.0/bin/amqp-get
lrwxr-xr-x 1 mark admin 43 11 Oct 13:30 amqp-publish -> ../Cellar/rabbitmq-c/0.8.0/bin/amqp-publish
lrwxr-xr-x 1 mark admin 28 17 Jul 22:49 7z -> ../Cellar/p7zip/16.02/bin/7z
lrwxr-xr-x 1 mark admin 29 17 Jul 22:49 7za -> ../Cellar/p7zip/16.02/bin/7za
lrwxr-xr-x 1 mark admin 29 17 Jul 22:49 7zr -> ../Cellar/p7zip/16.02/bin/7zr
lrwxr
As you can see, ack
points to version 2.14 of ack
in the Cellar and so on.
In general therefore, when using homebrew, you should not directly use anything in the Cellar because that is version-specific. Instead, you should use /usr/local/bin
and rely on that pointing to the latest/greatest thing in the Cellar. That way you won't have pain when upgrading and you won't have to change all your app-1.01
to app-1.0.2
in all your scripts because you will just be using app
(which, by virtue of your PATH, means /usr/local/bin/app
) instead of anything version-specific.
So, I would suggest you edit your bash
profile, using TextEdit
like this:
open -e ~/.profile
and add this line at the end:
export PATH=/usr/local/bin:$PATH
Remove all your version-specific aliases and log out and then back in again.