I am a little confused here. I have git installed via homebrew but I'm not 100% sure if the git I am using
in the terminal is the git I have installed via homebrew. In fact this goes for all packages which I have installed via homebrew.
Looking at the below sequence of commands, do I need to add anything extra to $PATH? For instance, should I be adding my brew cellar?
Code:
mbp:~ m$ brew --prefix
/usr/local
mbp:~ m$ brew --cellar
/usr/local/Cellar
mbp:~ m$ ls /usr/local/Cellar/
git ossp-uuid postgresql readline
mbp:~ m$ which git
/usr/local/bin/git ...is this really the git which brew installed?
mbp:~ m$ which oosp-uuid ...and why can't which find this if git has this installed?
mbp:~ m$ which postgresql ...this too?
mbp:~ m$ which readline ... and this too?
mbp:~ m$ echo $PATH
/Users/m/.rvm/gems/ruby-1.9.2-p180/bin:/Users/m/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/m/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/m/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
thanks Michelle
---------- Post updated at 10:28 ---------- Previous update was at 10:24 ----------
...hold on from the below code it is evident that the git I am using is definitely the one I installed from homebrew:-
Code:
mbp:~ m$ which git
/usr/local/bin/git
mbp:~ m$ brew list
git ossp-uuid postgresql readline
mbp:~ m$ brew uninstall git
Uninstalling /usr/local/Cellar/git/1.7.5.4...
mbp:~ m$ brew list
ossp-uuid postgresql readline
mbp:~ m$ which git ...can't find git anymore so I must have been using the git installed by homebrew
mbp:~ m$ brew install git
==> Downloading http://kernel.org/pub/software/scm/git/git-1.7.5.4.tar.bz2
...
==> Summary
/usr/local/Cellar/git/1.7.5.4: 1062 files, 19M, built in 15 seconds
mbp:~ m$ brew list
git ossp-uuid postgresql readline
mbp:~ m$ which git
/usr/local/bin/git ....yay, homebrew installed git back again
mbp:~ m$
Then I have two remaining questions:
(1) why is whichpostgresql [readline etc] not returning anything?
(2) how does my system know to look in homebrew's cellar (as it does with git) if there is nothing relating to homebrew in $PATH?
Thanks, Michelle
Last edited by michellepace; 06-25-2011 at 05:42 AM..
Reason: wrapping... not wrapping. make it wrap.
I don't have HOMEBREW installed but to answer your first question, postgresql is not in your path. Try the following :
Code:
ls -lFG /usr/local /usr/local/bin /usr/local/Cellar
I'm guessing that the files in /usr/local/Cellar are directories and however HOMEBREW installs it should put executables or symlinks in /usr/local/bin.
Hello,
I installed the package manager called homebrew a few days ago. Everything seems to be working fine but today I've just noticed this funny looking directory $(brew --prefix). I'm not sure if I made a mistake and duplicated this directory from somewhere else, or if it's suppose to be... (3 Replies)