Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am unable to install any software packages using homebrew. I get the following error when I try to install any softwares.

    Rahuls-iMac:local rahuljeevanandam$ brew install mysql
    ==> Installing mysql dependency: cmake
    ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.1
    Already downloaded: /Library/Caches/Homebrew/cmake-2.8.10.1.lion.bottle.tar.gz
    Error: SHA1 mismatch
    Expected: 31856bbd662ca47c325761fc7040e43f9a635c64
    Actual: 4b2ea1d2785009c32d85d1d0e0c7dc4cd68322b7
    Archive: /Library/Caches/Homebrew/cmake-2.8.10.1.lion.bottle.tar.gz
    (To retry an incomplete download, remove the file above.)

    Rahuls-iMac:local rahuljeevanandam$ brew install wget
    ==> Downloading http://ftpmirror.gnu.org/wget/wget-1.14.tar.gz
    ######################################################################## 100.0%
    Error: SHA1 mismatch
    Expected: c487bce740b3a1847a35fb29b5c6700c46f639b8
    Actual: ca98a1bf07f850bc23731fd15d869d1b73ef8c84
    Archive: /Library/Caches/Homebrew/wget-1.14.tar.gz
    (To retry an incomplete download, remove the file above.)
share|improve this question

5 Answers 5

up vote 1 down vote accepted
+50

This error indicates that the files being downloaded are corrupt or not the expected files. What is your internet connection like? Try downloading these URLs directly from your browser. (If your router or ISP is inserting ads or a login page, you may be downloading this instead of the actual file.)

share|improve this answer

Remove the previously downloaded files:

cd /Library/Caches/Homebrew/
rm cmake-2.8.10.1.lion.bottle.tar.gz wget-1.14.tar.gz

You may need to do the above as sudo. Then try the install again:

brew install mysql wget
share|improve this answer
    
This should work. It's a corrupt file issue. Also run brew doctor, brew cleanup and brew update to be safe. –  Fr. Jan 10 '13 at 6:06

As of now(Aug 2013) the URL given downloads a Html file that includes

The document has moved here

so it looks like Homebrew is pointing to the wrong place and they need to alter the brew file

share|improve this answer

Type

brew cleanup

follow by

brew update

then try again!

share|improve this answer

I was trying to install sdl_image on OS X (brew install sdl_image).

brew install sdl_image
==> Downloading http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.1
######################################################################## 100.0%
Error: SHA1 mismatch
Expected: e3dbbb034dd458fdb4e258439e532d18319569f9
Actual: 215e64541e50a2f09fdc77a2563e6c810fc54d4f
Archive: /Library/Caches/Homebrew/sdl_image-1.2.12.tar.gz
(To retry an incomplete download, remove the file above.)

One of the reasons was that the file was corrupt. This was because I was behind a server that blocks/does not allow a given size of downloads. I got frustrated for days until I moved to another network when it successfully downloaded it, though there was still that problem of SHA1 mismatch when I try to install. But it was giving the error with the actual SHA of the correct download (I was getting this SHA on expected for the corrupted files).

To fix this I run brew edit sdl_image and copied the actual to the SHA in this document.

share|improve this answer

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.