Unable to extract .tar.xz files

21,045

Solution 1

xz-utils can extract xz compressed files

Install it with the following command:

sudo apt install xz-utils -y

Then use it as below to extract your file:

xz -d amdgpu-pro-17.30-450654.tar.xz

Solution 2

tar -xvf amdgpu-pro-17.30-450654.tar.xz

No need for J in the beginning! With J you are filtering it, but usually it's not neccessary.

Share:
21,045

Related videos on Youtube

andrew.46
Author by

andrew.46

The Tao is close, but you look far away. Life is simple yet you look for problems...

Updated on September 18, 2022

Comments

  • andrew.46
    andrew.46 over 1 year

    I am new to Linux and I am trying to install AMD drivers on my system. For this I downloaded the file from AMD website. It is called amdgpu-pro-17.30-465504.tar.xz. In the website it says that I have to extract the file using the following command

    tar -Jxvf amdgpu-pro-17.30-450654.tar.xz
    

    But when I do this, I am getting the following error.

    username@Lenovo:~/Downloads$ tar -Jxvf amdgpu-pro-17.30-465504.tar.xz
    xz: (stdin): File format not recognized
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    

    How can I install extract it? What is the cause of this error?

    • Nonny Moose
      Nonny Moose over 6 years
      Are you sure it was a .xz file? The error you're getting means xz doesn't think it's an xz file.
    • sudodus
      sudodus over 6 years
      What happens with the command tar -xvf amdgpu-pro-17.30-450654.tar.xz (without the J)? Could the file be damaged or given the wrong extension?
    • Admin
      Admin over 6 years
      Same error again
    • Rinzwind
      Rinzwind over 6 years
      use file amdgpu-pro-17.30-465504.tar.xz to check what it is.
    • Admin
      Admin over 6 years
      @Rinzwind Now gives the output saying : amdgpu-pro-17.30-465504.tar.xz: data
    • mikewhatever
      mikewhatever over 6 years
      It the file fully downloaded yet?
    • Admin
      Admin over 6 years
      @mikewhatever Yes it is
    • muru
      muru over 6 years
      If file says it's just data, the download was probably corrupted. Download again
  • Stephen Rauch
    Stephen Rauch almost 6 years
    Can you expand on this answer a bit?
  • tresf
    tresf almost 3 years
    When I remove the J, I get a new error... "tar: This does not look like a tar archive".