[SOLVED] Option to not build from source?

(Ian Max Andolina) #1

Hi, I work in China where reliable connectivity to external servers is patchy at best (including via VPN servers). Often formulas with precompiled binaries or bottles fail to download, and brew tries to build from source. Depending on the formula this causes a large download of unnecessary dependencies, which themselves may only partially install because of the network instability. It would be great if we had a --bottle-only switch so that if upgrades fail, not to trigger an attempt to build from source.

(Mike McQuaid) #2

Thanks for the suggestion @iandol. We’ve had a few people ask for this and I’ll open a PR at some point to implement this functionality (most likely with an environment variable that will be documented in brew man). Keep an eye on the Homebrew release notes and you’ll see when it’s released.

(Mike McQuaid) #3

Have opened a pull request here: https://github.com/Homebrew/brew/pull/5528

(Ian Max Andolina) #4

Brilliant, thanks so much Mike! For others, this has now been released in V1.9.2 and the ENV to set is HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: