ITPub博客

首页 > Linux操作系统 > Linux操作系统 > tar (child): bzip2: Cannot exec: No such file or directory 报错

tar (child): bzip2: Cannot exec: No such file or directory 报错

原创 Linux操作系统 作者:wuweilong 时间:2020-03-05 19:29:20 0 删除 编辑

tar (child): bzip2: Cannot exec: No such file or directory 报错

 

问题现象:

[root@open_source ~]# tar -jxf postgresql-10.12.tar.bz2 
tar (child): bzip2: 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


问题原因:

       没有安装bzip2包

[root@open_source ~]# rpm -qa|grep bzip
bzip2-libs-1.0.6-13.el7.x86_64


 

解决办法:

        安装bzip包

[root@open_source ~]# yum install -y bzip2
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
base                                                                          | 2.8 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================
 Package              Arch                  Version                        Repository           Size
=====================================================================================================
Installing:
 bzip2                x86_64                1.0.6-13.el7                   base                 52 k
 
Transaction Summary
=====================================================================================================
Install  1 Package
 
Total download size: 52 k
Installed size: 86 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : bzip2-1.0.6-13.el7.x86_64                                                         1/1 
  Verifying  : bzip2-1.0.6-13.el7.x86_64                                                         1/1 
 
Installed:
  bzip2.x86_64 0:1.0.6-13.el7                                                                        
 
Complete!
[root@open_source ~]# rpm -qa|grep bzip
bzip2-1.0.6-13.el7.x86_64
bzip2-libs-1.0.6-13.el7.x86_64


 

验证:

        问题已解决:

[root@open_source ~]# tar -jxf postgresql-10.12.tar.bz2 
[root@open_source ~]# ls -rld postgresql-10.12
drwxrwxrwx 6 1107 1107 273 Feb 10 17:32 postgresql-10.12



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20674423/viewspace-2678745/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle ACE Associate; 12cOCM;11gOCM;MySQL OCP;PGCA;PGCE;KCA; KCP; 本人拥有十年以上运营商,广电传媒,能源,制造等行业DBA从业经验; 有着丰富的管理及运维经验,经历过国家级重点项目,省级标杆项目,新型试点项目

注册时间:2010-01-08

  • 博文量
    779
  • 访问量
    4927187