After trying to install a certain Port on FreeBSD 8.2, the following error was being reported:

tar: Unrecognized archive format

After a bit of digging, I found out the distributed version of bsdtar wasn’t recognizing xz compression between -7 and -9.

As a workaround, while not upgrading to FreeBSD 8.3, you can do the following:

  • Install the Port archivers/libarchive; and
  • Append the line below in the file /etc/make.conf:
TAR=/usr/local/bin/bsdtar

That being done, you now will be able to successfully install the failing Port.

More info.

UPDATE

If you are getting the error below while installing archivers/libarchive:

error: spawn.h: No such file or directory

You should try installing it with the following commands:

make clean
make ac_cv_header_spawn_h=no
make install