.tgz file – tar: Unrecognized archive format

you are trying to gunzip/untar not the archive file but the error page:

<html>
<head><title>403 Forbidden</title></head>
<body>
<h1>403 Forbidden</h1>
<ul>
<li>Code: AccessDenied</li>
<li>Message: Access Denied</li>
</ul>
<hr/>
</body>
</html>

try this link http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.4.0.tgz


Apologies, try http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.4.0.tgz The download URL changed with the release which we'll fix in the docs.