Go Back   The macosxhints Forums > OS X Help Requests > UNIX - Newcomers



 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 06-25-2011, 03:55 AM   #1
michellepace
Prospect
 
Join Date: Jan 2009
Location: South Africa
Posts: 42
Homebrew - two newbie questions

Hello, Before doing the below code I was wondering whether or not I was using the git installed via homebrew. I thought perhaps I was using another git on my system. I proved to myself that I wasn't:
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 was using homebrew installed git
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
Now looking at the code directly below I have two questions -

(Q1) How does my system know to use homebrew's "cellar" if I have no reference to the cellar in my $PATH?

(Q2) Why can't my system seem to find other stuff which is in the cellar? (eg postgresql)?

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$ brew list
git        ossp-uuid    postgresql    readline
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
mbp:~ m$ which postgresql    ??why can't i find these?
mbp:~ m$ which readline       ??
mbp:~ m$ which ossp-uuid     ??
thanks, Michelle
michellepace is offline   Reply With Quote
 

Tags
unix

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 01:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.