MongoDB解压报错gzip: stdin: not in gzip format的解决方法

在安装MongoDB时出现如下报错:

[root@vm172--- mongodb]# tar -zxvf mongodb-linux-x86_64-4.1..tgz 

gzip: stdin: not in gzip format
tar: Child returned status
tar: Error is not recoverable: exiting now

出现这种错误的排查方法如下:

1.用重命名的方法

mv tar xf mongodb-linux-x86_64-4.1..tgz tar xf mongodb-linux-x86_64-4.1..tar.gz

进行解压

[root@vm172--- mongodb]# tar –zxvf mongodb-linux-x86_64-4.1..tar.gz

gzip: stdin: not in gzip format
tar: Child returned status
tar: Error is not recoverable: exiting now

发现报错依旧存在。

2.查看下载的安装包是否本身就是损坏的

[root@vm172--- tools]# ls -lht
total 74M
-rw-r--r-- root root 505K Feb : mongodb-linux-x86_64-4.1..tar.gz

发现安装包只有505k,明显是下载的安装包就是损坏的,

3.查看文件的属性是什么

[root@vm172--- tools]# file mongodb-linux-x86_64-4.1..tar.gz
mongodb-linux-x86_64-4.1..tar.gz: HTML document, UTF- Unicode text, with very long lines, with CR, LF line terminators

发现文件属性是HTML,所以一直解压失败。

说明:

文件的下载链接不是直接指向文件,而是先指向一个页面,在这个页面里才是真的下载链接,所以在前一个页面上直接保存文件,实际上保存的是一个页面。

假如属性是bz文件,就用bz文件的解压方式。

解决方法:

复制下载地址,直接去浏览器重新下载即可。

MongoDB解压报错gzip: stdin: not in gzip format的解决方法的更多相关文章

  1. 支付宝 报错 rsa_private read error : private key is NULL解决方法

    原因:  真机调试IOS支付宝功能GDB出现 rsa_private read error : private key is NULL提示 调试iOS 支付宝SDK的时候,执行demo.把 Partn ...

  2. mysql用查询结果当删除的判断条件进行删除报错1093 You can't specify target table解决方法

    mysql用查询结果当删除的判断条件进行删除报错1093 You can't specify target table解决方法 #分开两个sql执行正常的语句,只保留最新1000条数据,删掉1000条 ...

  3. 报错NameError: name ‘null’ is not defined的解决方法

    报错NameError: name 'null' is not defined的解决方法 eval()介绍 eval()函数十分强大,官方demo解释为:将字符串str当成有效的表达式来求值并返回计算 ...

  4. memcached解压报错gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now的解决方法

    最近在部署环境,在安装memcached的过程中解压时, 解压命令:tar -zvxf memcached-1.4.34.tar.gz 遇到了一个问题, gzip: stdin: not in gzi ...

  5. 解压报错gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now的解决方法

    在部署tomcat的环境搞JDK的时候出现这个问题.分享一下. 解压命令:tar -zvxf memcached-1.4.34.tar.gz 遇到了一个问题, gzip: stdin: not in ...

  6. linux下 python源码包解压报错

    执行下面的命令 tar -zvxf Python.3.6.5.tgz 报错 gzip: stdin: not in gzip format tar: Child returned status 1 t ...

  7. Python tarfile模块解压报错 invalid mode ('wb') or filename

    问题原因 在使用tarfile模块解压一份Linux服务器上的打包文件时, 出现了错误提示: IOError: [Errno 22] invalid mode ('wb') or filename. ...

  8. linux下unzip解压报错“symlink error: File name too long”怎么办?提供解决方案。

    点击上方↑↑↑蓝字[协议分析与还原]关注我们 " 分享unzip工具的一个bug." 最近在研究菠菜站,中间用到了Spidermonkey,碰到一些小波折,在这里分享出来,以便大家 ...

  9. python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

    python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...

随机推荐

  1. 微信小程序拒绝授权,反复调起原生授权框。

    最近堕落了,有一阵子没有更新博客园了.一是比较忙,其次也没什么好的题材和工作中的解决方案可以分享的,想想还是把罕见的反复调起原生小程序授权框的方案拿出来说说.   市面上常见的解决方案是第一次拒绝后, ...

  2. Javascript学习---倒计时

    function fn() { var now = new Date(); // 此时此刻的时间 var old = new Date(2018, 9, 30); // 2018,6,25 var t ...

  3. 未能加载文件或程序集“BLL”或它的某一个依赖项。生成此程序集的运行时比当前加载的运行时新,无法加载此程序集。

    今天使用VS2012创建项目的时候,考虑到项目中代码的重用性以及清晰简洁性,搭建了一个三层架构,但是在项目运行的时候,总是报错: “未能加载文件或程序集“BLL”或它的某一个依赖项.生成此程序集的运行 ...

  4. 基于Openstack环境下开启SRIOV

    主题思想: 先在系统层面修改配置文件,再去openstack里面修改配置文件 compute node系统层面: 先确认下是否含有ixgbe moudle lsmod |grep ixgbe 修改/e ...

  5. 29.求3x3的整数矩阵对角线元素之和

    #include <stdio.h> #include <stdlib.h> int main() { ,a[][]; ;i<;i++) { ;j<;j++) sc ...

  6. Scrapy创建项目问题

    创建项目时报错 ModuleNotFoundError: No module named 'cryptography.hazmat.bindings._constant_time' pip insta ...

  7. Python 多线程的程序不结束多进程的程序不结束的区别

    import time from threading import Thread from multiprocessing import Process #守护进程:主进程代码执行运行结束,守护进程随 ...

  8. centos7 安装mysql出现Could NOT find Curses (missing CURSES_LIBRARY CURSES_INCLUDE_PATH)

    今天安装mysql 5.7 编译时出现一下问题: [root@localhost software]# cd mysql-5.7.21 [root@localhost mysql-5.7.21]# c ...

  9. Codeforces Hello 2018 E题Logical Expression dp+最短路 好题

    j题目链接: http://codeforces.com/contest/913/problem/E 题意: 给你x,y,z三个变量,与&   或|  非!  括号()   四种运算符,规定括 ...

  10. Python:从入门到实践--第九章-类--练习

    #.餐馆:创建一个名为Restaurant的类,其方法_init_()设置两个属性:restaurant_name和cuisine_type. #创建一个名为describe_restaurant的方 ...