108
30
When I tar up files on my Macbook and untar them in Linux, I repeatedly get the following warnings/errors:
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
tar: Ignoring unknown extended header keyword `SCHILY.dev'
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
tar: Ignoring unknown extended header keyword `SCHILY.dev'
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
tar: Ignoring unknown extended header keyword `SCHILY.dev'
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
tar: Ignoring unknown extended header keyword `SCHILY.dev'
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
tar: Ignoring unknown extended header keyword `SCHILY.dev'
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
tar: Error exit delayed from previous errors
Fortunately, this does NOT affect the files stored in the archive, which are restored perfectly. However, it does cause problems in a number of scenarios, especially when dealing with build processes where the non-zero failure code returned by 'tar' causes builds and installs to stop unnecessarily.
How can I get OS X to build tar files that play nicely with the rest of the Linux world?
Also, for bonus points, there exists a publicly distributed tar file with these issues. Is there any way to get Linux to handle the tar file gracefully without changing the way it was originally compressed?
sudo port install gnutar cd /usr/bin sudo rm tar sudo ln -s /opt/local/bin/gnutar tar – chaosless – 2014-10-31T00:41:59.883
1If using MacPorts, you can also just put /opt/local/libexec/gnubin/ at the top of your PATH rather than removing anything from /usr/bin or manually creating symlinks. – Lorrin – 2017-02-13T22:57:06.170
If using Homebrew:
brew install gnu-tar
– TrinitronX – 2019-10-07T21:19:07.71017Mac OS X 10.6 uses a BSD tar by default but also ships with a gnutar at
/usr/bin/gnutar
. – None – 2011-08-03T22:03:08.477@Ned. Thx. that's good info. – Dave Dopson – 2011-08-04T00:31:05.187
16FYI : /usr/bin/gnutar is not shipped anymore with Mac OS X (at least as of Mavericks) – foobar – 2013-11-27T13:52:41.583