Unix & Linux

Resolving error “tar: Unrecognized archive format on FreeBSD < 8.3"

Today I tried to install phpMyAdmin on older server, running on FreeBSD 8.1, but I’ve got error message:

=> phpMyAdmin-4.0.5-all-languages.tar.xz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch
phpMyAdmin-4.0.5-all-languages.tar.xz         100% of 4465 kB 1531 kBps
===> Fetching all distfiles required by phpMyAdmin-4.0.5 for building
===>  Extracting for phpMyAdmin-4.0.5
=> SHA256 Checksum OK for phpMyAdmin-4.0.5-all-languages.tar.xz.
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
*** Error code 1

Stop in /usr/ports/databases/phpmyadmin.
*** Error code 1

Stop in /usr/ports/databases/phpmyadmin.

On recent versions of FreeBSD, the tar binary has been replaced by bsdtar util. On old FreeBSD’s (8.2, 7.2 and more), the classic tar util is used. The problem that tar doesn’t recognise  lzma archives. So to resolve this problem we should install libarchive port and tell FreeBSD port tree to use bsdtar instead tar:

$ cd /usr/ports/archivers/libarchive
$ make install clean

Then edit /etc/make.conf and add the following line:


Leave a Reply

Your email address will not be published. Required fields are marked *