1. 程式人生 > >tar解壓Unexpected EOF in archive錯誤

tar解壓Unexpected EOF in archive錯誤

使用tar解壓一個從網路下載的文件:

tar xvf origin_data.tar

出現如下報錯資訊:

tar: Unexpected EOF in archive
tar: rmtlseek not stopped at a record boundary
tar: Error is not recoverable: exiting now

出現以上的問題一般有兩種情況。第一種是由於檔案字尾名與檔案真實的格式不匹配。通過file命令檢視檔案格式:

file origin_data.tar
origin_data.tar: POSIX tar archive
#在這裡檔案格式與字尾名一致

第二種情況就是檔案在傳輸過程中出現了錯誤,下載不完整。將文件在Windows系統上使用解壓軟體,解壓看是否報錯,報錯的話基本就可以確定是文件下載錯誤。我這裡解壓不成功,所以我只能重新下載了。
重新下載就解壓成功了。
在這裡插入圖片描述