5

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?

8
  • 1
    Are you sure it was a .xz file? The error you're getting means xz doesn't think it's an xz file. Oct 20, 2017 at 15:30
  • 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?
    – sudodus
    Oct 20, 2017 at 15:30
  • Same error again
    – user749735
    Oct 20, 2017 at 15:32
  • use file amdgpu-pro-17.30-465504.tar.xz to check what it is.
    – Rinzwind
    Oct 20, 2017 at 15:32
  • 1
    If file says it's just data, the download was probably corrupted. Download again
    – muru
    Oct 21, 2017 at 0:12

2 Answers 2

7

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

1
  • Worth noting that the command in this answer will automatically remove the .xz file unless you append -k option.
    – RayLuo
    Aug 11, 2023 at 8:35
3
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.

2
  • 1
    Can you expand on this answer a bit? Jul 7, 2018 at 21:03
  • When I remove the J, I get a new error... "tar: This does not look like a tar archive".
    – tresf
    Jul 14, 2021 at 22:21