Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use Homebrew to install wget, but something is happening where the download is always corrupt. This happens for all packages, not just wget. I can download the tar.gz fine through a browser. Can I use Homebrew to install a locally downloaded archive? Something such as:

brew install wget-1.14.tar.gz 
share|improve this question
1  
Seems very odd. I don't know of you can do that but it sounds like something more serious is happening. Have you tried running brew doctor? – boyfarrell Mar 6 '13 at 2:45
    
If you have the exact archive that Homebrew's expecting, you can put it in ~/Library/Caches/Homebrew and then try brew install. But this is mysterious. How about posting the output of brew install when you try it the normal way? – echristopherson Mar 6 '13 at 2:48
    
@echristopherson Your method worked. If you post it as an answer, I'll accept it. – MD6380 Mar 7 '13 at 17:34
    
I know why it doesn't work. Brew doctor doesn't show any issues. It looks like the HTTP proxy being used isn't allowing the download. – MD6380 Mar 7 '13 at 17:35
    
Just to note, this is useful when there are multiple mirrors and the one in the recipe doesn't work. You can set a different SourceForge mirror via an environment variable, but for others the accepted solution is very useful. – Dan Jul 31 '13 at 19:58
up vote 14 down vote accepted

If Homebrew already has a formula for it (in /usr/local/Library/Formula), and you have the exact archive that the formula expects (i.e. same file name and same contents, as determined by SHA1 or whatever hash type the formula uses), you can put the archive in ~/Library/Caches/Homebrew and then try brew install formula_name (substituting the correct name for formula_name, of course).

share|improve this answer
2  
Homebrew folder does not exist, but it works after I mkdir one. – eccstartup Oct 17 '13 at 14:57
    
brew install didn't work for me, but brew install <package> did. Thanks! – Zayne S Halsall May 16 at 11:59
    
Oh, I had left that implicit. I'm fixing that in my answer. – echristopherson May 16 at 19:12
$ brew install -f wget-1.14.tar.gz
share|improve this answer
    
Different package but same requirement, -f doesn't appear to work: zaynehalsall@mbp:~$ brew install -f Library/Caches/Homebrew/pwgen-2.07.tar.gz Error: No available formula with the name "Library/Caches/Homebrew/pwgen-2.07.tar.gz" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps. zaynehalsall@mbp:~$ – Zayne S Halsall May 16 at 11:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.