title: Homebrew install MongoDB fails
body: <p>I have an issue installing mongodb via homebrew (new MacBook Pro, OS X 10.10.2, fresh installation). Apperantly, every other package that I try to install (for example <code>wget</code>) is throwing this errors, but the packages are correctly installed. Unfortunately, the installation of <code>brew install mongodb</code> fails with the following error:</p>
  
  <pre><code>==&gt; Downloading https://downloads.sf.net/project/machomebrew/Bottles/mongodb-2.6.7.yosemite.bottle.tar.gz
  
  curl: (60) SSL certificate problem: Invalid certificate chain
  More details here: http://curl.haxx.se/docs/sslcerts.html
  
  curl performs SSL certificate verification by default, using a "bundle"
   of Certificate Authority (CA) public keys (CA certs). If the default
   bundle file isn't adequate, you can specify an alternate file
   using the --cacert option.
  If this HTTPS server uses a certificate signed by a CA represented in
   the bundle, the certificate verification probably failed due to a
   problem with the certificate (it might be expired, or the name might
   not match the domain name in the URL).
  If you'd like to turn off curl's verification of the certificate, use
   the -k (or --insecure) option.
  Error: Failed to download resource "mongodb"
  Download failed: https://downloads.sf.net/project/machomebrew/Bottles/mongodb-2.6.7.yosemite.bottle.tar.gz
  Warning: Bottle installation failed: building from source.
  ==&gt; Installing mongodb dependency: scons
  ==&gt; Downloading https://downloads.sf.net/project/machomebrew/Bottles/scons-2.3.4.yosemite.bottle.1.tar.gz
  
  curl: (60) SSL certificate problem: Invalid certificate chain
  More details here: http://curl.haxx.se/docs/sslcerts.html
  
  curl performs SSL certificate verification by default, using a "bundle"
   of Certificate Authority (CA) public keys (CA certs). If the default
   bundle file isn't adequate, you can specify an alternate file
   using the --cacert option.
  If this HTTPS server uses a certificate signed by a CA represented in
   the bundle, the certificate verification probably failed due to a
   problem with the certificate (it might be expired, or the name might
   not match the domain name in the URL).
  If you'd like to turn off curl's verification of the certificate, use
   the -k (or --insecure) option.
  Error: Failed to download resource "scons"
  Download failed: https://downloads.sf.net/project/machomebrew/Bottles/scons-2.3.4.yosemite.bottle.1.tar.gz
  Warning: Bottle installation failed: building from source.
  ==&gt; Downloading https://downloads.sourceforge.net/scons/scons-2.3.4.tar.gz
  
  curl: (60) SSL certificate problem: Invalid certificate chain
  More details here: http://curl.haxx.se/docs/sslcerts.html
  
  curl performs SSL certificate verification by default, using a "bundle"
   of Certificate Authority (CA) public keys (CA certs). If the default
   bundle file isn't adequate, you can specify an alternate file
   using the --cacert option.
  If this HTTPS server uses a certificate signed by a CA represented in
   the bundle, the certificate verification probably failed due to a
   problem with the certificate (it might be expired, or the name might
   not match the domain name in the URL).
  If you'd like to turn off curl's verification of the certificate, use
   the -k (or --insecure) option.
  Error: Failed to download resource "scons"
  Download failed: https://downloads.sourceforge.net/scons/scons-2.3.4.tar.gz
  </code></pre>
  
  <p>I also found this thread <a href="https://stackoverflow.com/questions/18964175/how-to-fix-curl-60-ssl-certificate-invalid-certificate-chain">How to fix curl: (60) SSL certificate: Invalid certificate chain</a>, where I added the certificate for <code>downloads.sf.net</code> and <code>downloads.sourceforge.net</code> (both use <code>*.cloudfront.net</code> as its certificate, and therefore, you get a domain missmatch) via Safari to "Always trust". After this, the installation fails with a SHA1 missmatch (and I also ran <code>brew cleanup -s</code> to cleanup the old cached packages):</p>
  
  <pre><code>==&gt; Downloading https://downloads.sf.net/project/machomebrew/Bottles/mongodb-2.6.7.yosemite.bottle.tar.gz
  ######################################################################## 100.0%
  Error: SHA1 mismatch
  Expected: 4b1749b645a744b38b4959daac46bf80353e3b32
  Actual: a2fd3379ea944f6b2f97fb0f79b7b85cb3e14d0b
  Archive: /Library/Caches/Homebrew/mongodb-2.6.7.yosemite.bottle.tar.gz
  To retry an incomplete download, remove the file above.
  Warning: Bottle installation failed: building from source.
  ==&gt; Installing mongodb dependency: scons
  ==&gt; Downloading https://downloads.sf.net/project/machomebrew/Bottles/scons-2.3.4.yosemite.bottle.1.tar.gz
  ######################################################################## 100.0%
  Error: SHA1 mismatch
  Expected: 819d08b7e8c1ba2451db6d7d848f689b108b40aa
  Actual: a2fd3379ea944f6b2f97fb0f79b7b85cb3e14d0b
  Archive: /Library/Caches/Homebrew/scons-2.3.4.yosemite.bottle.1.tar.gz
  To retry an incomplete download, remove the file above.
  Warning: Bottle installation failed: building from source.
  ==&gt; Downloading https://downloads.sourceforge.net/scons/scons-2.3.4.tar.gz
  ######################################################################## 100.0%
  Error: SHA1 mismatch
  Expected: 8c55f8c15221c1b3536a041d46056ddd7fa2d23a
  Actual: a2fd3379ea944f6b2f97fb0f79b7b85cb3e14d0b
  Archive: /Library/Caches/Homebrew/scons-2.3.4.tar.gz
  To retry an incomplete download, remove the file above.
  </code></pre>
  
  <p>I also found this github issue <a href="https://github.com/Homebrew/homebrew/issues/28844" rel="nofollow noreferrer">https://github.com/Homebrew/homebrew/issues/28844</a>, but I don't have any expired certificates in my keychain. Any help is appreciated!</p>