Set "/usr/local/bin/bsdtar" as default

I have a local package that I want to install on my FreeBSD 9.2-RELEASE box. The pkg_add command displays the following error when trying to install this package:

Code:
tar: Unrecognized archive format: Inapprpropriate file type or format.
I then tried to use the tar command (instead of pkg_add) to manually extract this package but I got the same error (above).

This made me think I had a bsdtar that was too old. So I installed a newer version of archivers/libarchive.

Once I installed archivers/libarchive, the /usr/local/bin/bsdtar command manually extracted the package just fine.

My two questions are:

How do I tell the tar symbolic link to use /usr/local/bin/bsdtar instead of /usr/bin/bsdtar? I shouldn't have to type out the whole path to (ex: /usr/local/bin/bsdtar to use the newer version, right? I also shouldn't have to change my $PATH statement either, correct?

How do I tell the pkg_add command to use " /usr/local/bin/bsdtar" instead of /usr/bin/bsdtar?
 
Back
Top