2017-09-27 90 views
1

我通过不能解开.tgz的MongoDB的分布在OSX

curl -O https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-2.6.12.tgz 

是的,我想MongoDB的版本2.6.12抢TGZ文件... :(

,我尝试使用解压缩它:

tar -xvzf mongodb-osx-ssl-x86_64-2.6.12.tgz 

,但我得到:

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

有人知道什么可能是错的?

回答

2

该文件没有下载属性,所以即使它是文件系统上的.tgz文件,它也是不完整或损坏的。为了得到一个合适的下载我以前下降了SSL

:后

curl -O https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-2.6.12.tgz 

curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.6.12.tgz 

然后用tar解包工作。 √

+0

对于3.4.2版本,答案有点不同。我改变了:'curl -O https:// fastdl.mongodb.org/osx-ssl/mongodb-osx-ssl-x86_64-3.4.2.tgz' for'curl -O https://fastdl.mongodb。组织/ OSX/MongoDB的-OSX-SSL-x86_64-3.4.2.tgz' –