Errors using brew install and brew update
I’m not a web developer, I just pretend to be one in my spare time, so please forgive (and point out) mistakes.
I had been reading a lot about the benefits of using PostgreSQL over MySQL. I found this Railscast, which like all Railscasts, is fantastic. But, when trying to install PostgreSQL with Homebrew, I kept getting errors, including:
curl: (7) couldn’t connect to host Error: Failure while executing: curl -f#LA ‘Homebrew 0.7.1 (Ruby 1.8.7-174; Mac OS X 10.7.3)’
I Googled and found that my Homebrew might be out of date, so I tried the proposed solution:
brew update
But, that gave me more errors even after I played around with it:
error: Untracked working tree file ‘.gitignore’ would be overwritten by merge.
and
error: The following untracked working tree files would be overwritten by checkout:
More Goolging and I finally confirmed that my Homebrew was out of date, and because of that, ironically, brew update wouldn’t work.
I went into my /usr/local directory:
cd /usr/local
and updated Homebrew with git:
git fetch https://github.com/mxcl/homebrew.git
git reset −−hard FETCH_HEAD
That worked.
I then had to update Xcode to 4.3. And the install command worked:
brew install postgresql

