Failed to decompress linux kernel using tar, the solution

Use tar xjf linux-4.16.4.tar.xz when decompressing linux-4.16.4.tar.xz

Prompt error:

bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2

tar: Error is not recoverable: exiting now

Solution:

1. Use the file command to query the file type of linux-4.16.4.tar.xz:

file  linux-4.16.4.tar.xz

xz: linux-4.16.4.tar.xz: File already has `.xz' suffix, skipping

Indicates that the kernel is a packed data format

2. Use xz to decompress: xz -d linux-4.16.4.tar.xz

linux-4.16.4.tar.xz becomes linux-4.16.4.tar

3. Unzip: tar -xvf linux-4.16.4.tar

Reprint address: http://bbs.51cto.com/thread-917214-1.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324837473&siteId=291194637