OK, so it turns out the problem was not with Homebrew, but with cURL, which was only downloading 2 KB of whatever file I threw at it and then failing. I was able to fix this by installing the latest version of cURL.
Steps taken to resolve:
1 . Opened http://curl.haxx.se/download/curl-7.27.0.tar.gz in a web browser,
saved to /Library/Caches/Homebrew/
2 . Ran brew install curl
.
3 . Any time I got a hash mismatch when downloading a dependency, I did steps 1 and 2 again, replacing the cURL package location with the one listed in the console output for the respective dependency.
4 . By default, OS X uses /usr/bin/curl
, whereas the Homebrew version apparently lived in /usr/local/Cellar/curl/7.27.0/bin/curl
. Which actually should have been symlinked as /usr/local/bin/curl
, but wasn’t for some reason—brew link curl fixed that though (may have had to repeat for dependencies).
5 . However, Homebrew apparently has the philosophy that it’s desirable to always use Apple’s system-default binaries if they’re available. Wasn’t in my case, so I followed this advice and added export PATH=/usr/local/bin:$PATH
to my bash profile, to do the reverse, and always use Homebrew binaries first, despite whatever bleeding edge repercussions that may have.
6 . brew update
.
7 . brew install sshfs
—success!