missing /usr/bin/gnutar on Mavericks (MacPorts)

Solution 1:

The problem is that your version of MacPorts was not built on Mavericks and assumes the tools that were there when it was installed are still available. Since this is no longer the case, you should re-install MacPorts, which will automatically fix this issue.

Since there is no binary installer for Mavericks at the moment, you will have to build from source instead. Make sure you have installed the Command Line Tools using xcode-select --install before you attempt to run ./configure in the MacPorts source tree. See http://guide.macports.org/#installing.macports.subversion for a how-to.

If you don't want to build a development version from source, a binary installer will be made available in the next few days.

Edit: A binary installer for Mavericks (for the 2.2.1 bugfix release) is now available: https://distfiles.macports.org/MacPorts/MacPorts-2.2.1-10.9-Mavericks.pkg.

Note that you should still run xcode-select --install in any case, even if you do have Xcode installed and use the binary installer.

Since this keeps getting referenced: If you just updated to Mavericks you should also follow https://trac.macports.org/wiki/Migration.

Solution 2:

My dirty hack was a symlink to system tar command.

sudo ln -s /usr/bin/tar /usr/bin/gnutar

Solution 3:

I downloaded the sources from:

http://www.gnu.org/software/tar/

Compiled the usual GNU way:

./configure
make

Afterwards I manually copied the generated binary as /usr/bin/gnutar. I am not sure were it is built, but I believe it was as ./src/tar

Of course, this was just a quick hack to install new ports. I would not upgrade all the ports (as recommended for OS upgrades) until there is an official MacPorts version supporting Mavericks.

Also, remember to delete that file before the next MacPorts version. Just to keep things clean.

Solution 4:

Edit:

This is not a permanent Solution! It is still recommended to reinstall MacPorts.

Quick solution:

Edit:

/opt/local/share/macports/Tcl/macports1.0/macports_autoconf.tcl
/opt/local/share/macports/Tcl/port1.0/port_autoconf.tcl

Change:

variable tar_command "/usr/bin/gnutar --no-same-owner"

to

variable tar_command "/usr/bin/tar -o"