问题:
使用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]$