最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

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

CentOS crifan 2133浏览 0评论
折腾:
【未解决】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 归档文件
tar: 它似乎不像是一个 tar 归档文件_解决方法_运维_潘建南的博客-CSDN博客
# 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的
tar:归档中找不到 tar: 由于前次错误,将以上次的错误状态退出_大数据_LzwGlory的专栏-CSDN博客
自己此处是xzf
难道是顺序问题,换:zxf试试
# tar zxf TDengine-client-1.6.5.5-Linux-x64.tar.gz
tar: 它似乎不像是一个 tar 归档文件
tar: 跳转到下一个头
tar: 由于前次错误,将以上次的错误状态退出
问题依旧
tar:由于前次错误,将以上次的错误状态退出。是怎么回事啊? – Ubuntu中文论坛
linux 解压的问题 – ITeye问答
tar -zxvf *.tar.gz
这个解压命令是不错,应该是你下载的文件不完整。
我也怀疑是这个
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 <[email protected]>.
看到有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 <http://www.gnu.org/licenses/gpl.html>.
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
【总结】
此处:
# 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
即可解压。

转载请注明:在路上 » 【已解决】CentOS中tar解压tar.gz报错:它似乎不像是一个 tar 归档文件

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.169 seconds, using 22.11MB memory