Extract tar the tar.bz2 file error

前端 未结 8 1105
后悔当初
后悔当初 2021-02-03 18:05

I tried to extract the tar.bz2 file in Fedora 17 OS. I used the command:

# tar -xvjf myfile.tar.bz2

I received this error message:

         


        
相关标签:
8条回答
  • 2021-02-03 18:45

    For bz2 you need to execute like this,

    tar -jxvf
    

    Alternatively, you can also execute like this

    bunzip2 myfile.tar.bz2
    

    For more information you should check it,

    tar --help
    

    If in doubt, run file on the archive to make sure it actually is compressed in bz2 format.

    0 讨论(0)
  • 2021-02-03 18:46

    You may need to install the bzip2 on your system.

    yum -y install bzip2
    

    I got the same problem . I have two server.

    A: CentOS 7.6 Min install

    B: Fedora 29 Workstation

    On B:create a tarball with:

    tar -jcvf  XXX.tar.bz2   /Path_to_my_dir
    

    Then scp this tarball to A server to decrompress it, but when I want to decompression it I got the same error.Finally it turns out that, tar could work with bzip2 but you have to install it first .

    0 讨论(0)
提交回复
热议问题