Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGary Ford
14,475 PointsProblems upgrading Git with Homebrew
I get the following warning when installing Git with Homebrew:
Warning: git-2.1.1 already installed, it's just not linked
I had been trying to update my version of Git with Homebrew using:
brew upgrade Git
and received this message: Error: git not installed
I then used the command: brew install git and received this message: Error: The brew link step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/git Target /usr/local/bin/git already exists. You may want to remove it: rm /usr/local/bin/git
To force the link and overwrite all conflicting files: brew link --overwrite git
To list all files that would be deleted: brew link --overwrite --dry-run git
I tried the overwrite command and received this error: Error: Could not symlink share/git-core/contrib /usr/local/share/git-core is not writable.
I then ran git --version and received: -bash: /usr/local/bin/git: No such file or directory
then ran brew install Git and received: Warning: git-2.1.1 already installed, it's just not linked
I'm a total loss as to what to do at this point. Any help would be much appreciated. Thanks in advance!
1 Answer
Ricky Catron
13,023 PointsI am not familar with Homebrew but when you try to upgrade git you use a capital "brew upgrade Git" and when you install it you use a lowercase " brew install git" to a computer those could be completely different programms. Perhaps try "brew upgrade git"? Best of luck!
Edit: After reviewing your question again I noticed there was a not writeable error. Could you need Sudo or administrator privliges? If you do becareful what you overwrite!
Gary Ford
14,475 PointsGary Ford
14,475 PointsI think I got it. Ran brew doctor and followed suggestions and also has a writeable to directory problem I fixed. All seems to be working so far. Thanks Ricky for your suggestions.