下载
中文
注册

解压qemu压缩包时提示tar命令不存在

问题描述

解压qemu压缩包时提示tar命令不存在:

[root@localhost ~]# tar -xf ./qemu-4.1.0.tar.xz
-bash: tar: command not found

解决方案

执行如下命令,安装tar命令。

yum -y install tar
[root@localhost ~]# yum -y install tar
Last metadata expiration check: 0:09:05 ago on Wed 22 Feb 2023 09:25:12 AM CST.
Dependencies resolved.
==================================================================================================================================================================================================
 Package                                    Architecture                                  Version                                             Repository                                     Size
==================================================================================================================================================================================================
Installing:
 tar                                        x86_64                                        2:1.32-1.oe1                                        update                                        772 k

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

Total download size: 772 k
Installed size: 3.2 M
Downloading Packages:
tar-1.32-1.oe1.x86_64.rpm                                                                                                                                         211 kB/s | 772 kB     00:03
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                             211 kB/s | 772 kB     00:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                          1/1
  Running scriptlet: tar-2:1.32-1.oe1.x86_64                                                                                                                                                  1/1
  Installing       : tar-2:1.32-1.oe1.x86_64                                                                                                                                                  1/1
  Running scriptlet: tar-2:1.32-1.oe1.x86_64                                                                                                                                                  1/1
  Verifying        : tar-2:1.32-1.oe1.x86_64                                                                                                                                                  1/1

Installed:
  tar-2:1.32-1.oe1.x86_64

Complete!
[root@localhost ~]#