Macos – .tgz file – tar: Unrecognized archive format

gzipmacosmongodbosx-mountain-liontar

I'm trying to install a 10gen build of MongoDB on my local Mac running Mountain Lion (10.8.3):

I fetch it with curl at:

curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.tgz > mongodb.tgz

But I can't extract the build:

Attempt 1:

$ tar -zxvf mongodb.tgz

tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

Attempt 2:

$ gunzip mongodb.tgz

gzip: mongodb.tgz: not in gzip format

Attempt 3:

$ unzip mongodb.tgz

Archive:  mongodb.tgz
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of mongodb.tgz or
        mongodb.tgz.zip, and cannot find mongodb.tgz.ZIP, period.

Double Clicking:
If I double click the tgz file in the finder, it creates a new file mongodb.tgz 2.cpgz


Any idea what I'm doing wrong here? I tried various builds and they all reproduce this issue:

http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.tgz > mongodb.tgz
http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.3.tgz > mongodb.tgz
http://downloads.mongodb.org/osx/mongodb-osx-x86_32-2.4.tgz > mongodb.tgz
http://downloads.mongodb.org/osx/mongodb-osx-x86_32-2.3.tgz > mongodb.tgz

Best Answer

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

Related Question