As one comment left on your OP mentioned: I'd be concerned that MD5 sums weren't matching. It could mean the tarball you're downloading is corrupt, in which case doing the above to override the match will actually cause you trouble because you'll be installing broken tools. Or it could be that the tarball you're downloading can't be trusted, that you're being given something that's not legit and contains potentially harmful routines. I'd make sure you're homebrew repository is up to date with:
brew update
If indeed it is up to date you can try:
brew install --force <package>
to force the installation. That option usually just forces a re-installation of an already-installed package of the same version but it may ignore an MD5 error. I poked through the install routine in homebrew
but it wasn't apparent this would work.
Worse case: you could just download the tarball for the formula, calculate the MD5 for it by hand and then update the Formula file with the appropriate MD5 value to get past the check. For example, if you were having trouble installing dos2unix you find the formula file in /usr/local/Library/Formula/dos2unix.rb
. At the top of the file is the tarball and the MD5 sum for it:
> more dos2unix.rb
require 'formula'
class Dos2unix < Formula
url 'http://waterlan.home.xs4all.nl/dos2unix/dos2unix-5.3.1.tar.gz'
md5 '438c48ebd6891b80b58de14c022ca69e'
homepage 'http://waterlan.home.xs4all.nl/dos2unix.html'
If the MD5 check is failing, download the tarball:
> wget http://waterlan.home.xs4all.nl/dos2unix/dos2unix-5.3.1.tar.gz
--2012-03-17 18:07:07-- http://waterlan.home.xs4all.nl/dos2unix/dos2unix-5.3.1.tar.gz
Resolving waterlan.home.xs4all.nl... 194.109.6.92, 2001:888:0:18::80
Connecting to waterlan.home.xs4all.nl|194.109.6.92|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 54967 (54K) [application/x-gzip]
Saving to: `dos2unix-5.3.1.tar.gz'
100%[==============================================================================================================>] 54,967 84.8K/s in 0.6s
2012-03-17 18:07:09 (84.8 KB/s) - `dos2unix-5.3.1.tar.gz' saved [54967/54967]
Calculate the MD5 checksum for the file yourself:
> md5 dos2unix-5.3.1.tar.gz
MD5 (dos2unix-5.3.1.tar.gz) = 438c48ebd6891b80b58de14c022ca69e
And then enter the value you computed in to the formula file for the bundle and re-run the install command for the bundle.
The underscores in the version numbers indicate Homebrew specific changes or revisions. It means the upstream software hasn't changed, just that the Homebrew formula has been revised in some way.
Taking node as an example, the current release version of Node.js is "0.10.33". However the Homebrew version number has been updated to "0.10.33_1" (in other words, revision 1 of 0.10.33) because the formula was updated to point to a newer version of npm (one of node's dependencies) as you can see in this commit. So it is still the same version of node, but the Homebrew package itself has a new revision.
Similar the luajit package is updated to 2.0.3_1 in this commit where the lua dependency is updated to a newer version. lua itself hasn't been changed, it is still version 2.0.3 but the Homebrew formula has been updated.
Long story short it's perfectly safe to update to releases with an underscore. They don't indicate beta releases.
Best Answer
By default, packages are installed in the way you describe... "Bottles" are precompiled binaries downloaded as compressed tape archives, the contents of which are then "poured" into the appropriate paths.
If you specify options, or use custom compile flags, then naturally brew will build from source. But if you for example,
brew install nmap htop bmon
, it will download the bottle for your system version and pour it along with any missing dependencies.That being said, there are definitely situations where brew compiles from source, so to try to answer your question, how often is it that you find this a problem?
There's no way to set it up so that brew compiles on a different machine "automagically" (that is, unless you implement this as a feature and implement it into your installation of brew). You can imagine how this could be difficult; architecture differences aside, conflicts/dependencies needing to be resolved, the differences in environment, etc. would make this a nightmare.
If this is more of an occasional annoyance than a regular problem, what you might want to try is install whatever formula you want on the faster machine with
--build-bottle
. Then you can "bottle" the package yourself by runningbrew bottle
to install on the slower machine.I can't recommend this with any level of confidence though, since I don't know how well it would work for all formulae. You would need to be on the same OS/architecture, and the binaries will be compiled for the lowest common denominator CPU (unless you specify which one) so the build might perform worse, depending on which features it was designed to use.
If the difference in compilation time is so large that this seems like a viable route, the two machines might not even be compatible (I don't remember what the 2008 MacBook was, core 2?), and cross-compiling within brew would be a whole separate headache all on its own, you might be better off just not using a package manager at all and compiling/configuring the software yourself.