tar: Ignoring unknown extended header keyword
·
1 min read
·
100
Words
·
-Views
-Comments
After creating a tar archive on macOS and extracting on CentOS/Linux, you may see:
tar: Ignoring unknown extended header keyword LIBARCHIVE.xattr.com.apple.metadata:kMDItemTextContentLanguage
. This is due to differences in macOS tar. Notes below.
Problem
On macOS, create the archive:
tar -czvf ../xxxx.tar.gz --exclude='.DS_Store' xxxx/*
On CentOS, extract:
tar -C xx/lib -xz
You’ll see output like:
tar: Ignoring unknown extended header keyword LIBARCHIVE.xattr.com.apple.metadata:kMDItemTextContentLanguage
Why
- macOS uses BSD tar and writes xattr headers. CentOS commonly uses GNU tar.
- The message is informational; extraction still works.
Fix
Install GNU tar on macOS: brew install gnu-tar
, then create with gtar -czvf ../xxxx.tar.gz --exclude='.DS_Store' xxxx/*
.