linux归档文件中的异常,【已解决】CentOS中tar解压tar.gz报错:它似乎不像是一个 tar 归档文件...

折腾:

【未解决】CentOS 7中安装TDengine的服务器端

期间,去解压tar.gz:[root@lin-16core3 tdengine]# ls -lh

总用量 8.4M

-rw-r--r-- 1 root root 3.3M 2月  29 18:36 TDengine-client-1.6.5.5-Linux-x64.tar.gz

-rw-r--r-- 1 root root 5.2M 2月  28 21:27 TDengine-server-1.6.5.5-Linux-x64.rpm

[root@lin-16core3 tdengine]# tar -xzf TDengine-client-1.6.5.5-Linux-x64.tar.gz

tar: 它似乎不像是一个 tar 归档文件

tar: 跳转到下一个头

tar: 由于前次错误,将以上次的错误状态退出

CentOS tar.gz tar: 它似乎不像是一个 tar 归档文件# file TDengine-client-1.6.5.5-Linux-x64.tar.gz

TDengine-client-1.6.5.5-Linux-x64.tar.gz: gzip compressed data, from Unix

貌似没问题,是gzip的

自己此处是xzf

难道是顺序问题,换:zxf试试# tar zxf TDengine-client-1.6.5.5-Linux-x64.tar.gz

tar: 它似乎不像是一个 tar 归档文件

tar: 跳转到下一个头

tar: 由于前次错误,将以上次的错误状态退出

问题依旧tar -zxvf *.tar.gz

这个解压命令是不错,应该是你下载的文件不完整。

我也怀疑是这个[root@lin-16core3 tdengine]# gzip --help

Usage: gzip [OPTION]... [FILE]...

Compress or uncompress FILEs (by default, compress FILES in-place).

Mandatory arguments to long options are mandatory for short options too.

-c, --stdout      write on standard output, keep original files unchanged

-d, --decompress  decompress

-f, --force       force overwrite of output file and compress links

-h, --help        give this help

-l, --list        list compressed file contents

-L, --license     display software license

-n, --no-name     do not save or restore the original name and time stamp

-N, --name        save or restore the original name and time stamp

-q, --quiet       suppress all warnings

-r, --recursive   operate recursively on directories

-S, --suffix=SUF  use suffix SUF on compressed files

-t, --test        test compressed file integrity

-v, --verbose     verbose mode

-V, --version     display version number

-1, --fast        compress faster

-9, --best        compress better

--rsyncable   Make rsync-friendly archive

With no FILE, or when FILE is -, read standard input.

Report bugs to .

看到有gunzip:[root@lin-16core3 tdengine]# which gunzip

/usr/bin/gunzip

[root@lin-16core3 tdengine]# gunzip --version

gunzip (gzip) 1.5

Copyright (C) 2007, 2011-2012 Free Software Foundation, Inc.

This is free software.  You may redistribute copies of it under the terms of

the GNU General Public License .

There is NO WARRANTY, to the extent permitted by law.

Written by Paul Eggert.

算了,去试试:[root@lin-16core3 tdengine]# gunzip TDengine-client-1.6.5.5-Linux-x64.tar.gz

[root@lin-16core3 tdengine]# ll

总用量 8604

-rw-r--r-- 1 root root 3406100 2月  29 18:36 TDengine-client-1.6.5.5-Linux-x64.tar

-rw-r--r-- 1 root root 5399408 2月  28 21:27 TDengine-server-1.6.5.5-Linux-x64.rpm

是可以解压出tar

然后再去看看类型:# file TDengine-client-1.6.5.5-Linux-x64.tar

TDengine-client-1.6.5.5-Linux-x64.tar: gzip compressed data, from Unix, last modified: Sun Feb  9 11:06:38 2020

然后去解压[root@lin-16core3 tdengine]# tar xf TDengine-client-1.6.5.5-Linux-x64.tar

[root@lin-16core3 tdengine]# ll

总用量 8608

drwxr-xr-x 5 root root    4096 2月   9 11:06 TDengine-client

-rw-r--r-- 1 root root 3406100 2月  29 18:36 TDengine-client-1.6.5.5-Linux-x64.tar

-rw-r--r-- 1 root root 5399408 2月  28 21:27 TDengine-server-1.6.5.5-Linux-x64.rpm

即可:[root@lin-16core3 tdengine]# cd TDengine-client

[root@lin-16core3 TDengine-client]# ls -lh

总用量 1.4M

drwxr-xr-x 5 root root 4.0K 2月   9 11:06 connector

drwxr-xr-x 2 root root 4.0K 2月   9 11:06 driver

drwxr-xr-x 8 root root 4.0K 2月   9 11:06 examples

-rwxr-xr-x 1 root root 5.5K 2月   9 11:06 install_client.sh

-rw-r--r-- 1 root root 1.4M 2月   9 11:06 taos.tar.gz

e598206f8c8100a99732dffccadebc1a.png

【总结】

此处:# tar -xzf TDengine-client-1.6.5.5-Linux-x64.tar.gz

tar: 它似乎不像是一个 tar 归档文件

tar: 跳转到下一个头

tar: 由于前次错误,将以上次的错误状态退出

然后此处格式不是普通的 tar.gz

通过file查看出实际是gzip的:# file TDengine-client-1.6.5.5-Linux-x64.tar.gz

TDengine-client-1.6.5.5-Linux-x64.tar.gz: gzip compressed data, from Unix

然后先解压:gunzip TDengine-client-1.6.5.5-Linux-x64.tar.gz

或:gzip -d TDengine-client-1.6.5.5-Linux-x64.tar.gz

然后再去:tar xf TDengine-client-1.6.5.5-Linux-x64.tar

即可解压。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值