Linux——常见问题-tar (child): zstd: Cannot exec: No such file or directory

问题:

使用tar 解压工具解压.zst格式的压缩文件时报错:tar (child): zstd: Cannot exec: No such file or directory,如下所示:

(icecc) [zhou@cp]$ tar -I zstd -xvf sm7.tar.zst ./zip/
tar (child): zstd: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

解决方法:

尝试一:使用apt安装zstd

(icecc) [zhou@cp]$ sudo apt install zstd
[sudo] password for lonzhou:
sudo: apt: command not found

机器上没有安装apt,所以安装zstd失败

尝试二:使用yum安装zstd

(icecc) [zhou@cp]$ sudo yum install zstd
[sudo] password for lonzhou:
Sorry, user zhou is not allowed to execute '/usr/bin/yum install zstd' as root on cp.

用户zhou没有权限在这个位置安装zstd

尝试三:使用root账户安装zstd

(icecc) [zhou@cp]$ su root
Password:
[root@cp]$ yum install zstd
Loaded plugins: priorities, search-disabled-repos
ee-cdb-prod                                                                                                                                                                       |  967 B  00:00:00
epel-7                                                                                                                                                                            | 4.7 kB  00:00:00
rhel7-supplementary                                                                                                                                                               | 4.2 kB  00:00:00
(1/2): epel-7/x86_64/updateinfo                                                                                                                                                   | 1.0 MB  00:00:01
(2/2): epel-7/x86_64/primary_db                                                                                                                                                   | 7.0 MB  00:00:01
580 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package zstd.x86_64 0:1.4.5-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================================================================
 Package                                      Arch                                           Version                                             Repository                                         Size
=========================================================================================================================================================================================================
Installing:
 zstd                                         x86_64                                         1.4.5-3.el7                                         ee-common                                         582 k

Transaction Summary
=========================================================================================================================================================================================================
Install  1 Package

Total download size: 582 k
Installed size: 1.6 M
Is this ok [y/d/N]: y  #这里有一个版本确认的操作,输入y表示安装上边显示的版本
Downloading packages:
zstd-1.4.5-3.el7.x86_64.rpm                                                                                                                                                       | 582 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : zstd-1.4.5-3.el7.x86_64                                                                                                                                                               1/1
  Verifying  : zstd-1.4.5-3.el7.x86_64                                                                                                                                                               1/1

Installed:
  zstd.x86_64 0:1.4.5-3.el7

Complete!
[root@cp]$

安装zstd安装成功

再次尝试解压该文件

(icecc) [zhou@cp]$ tar -I zstd -xvf sm7.tar.zst
./usr/bin/.debug/attr
...
省略...
...
(icecc) [zhou@cp]$

解压成功

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值