MacPorts is complaining about missing /usr/bin/gnutar on Mavericks

:info:extract sh: /usr/bin/gnutar: No such file or directory

gnutar is indeed not there anymore.

As suggested here I tried to change the tar command in /opt/local/etc/macports/macports.conf:

tar_command=/usr/bin/tar -0

with no effect.

Any suggestion? Did I configure tar_command in the wrong file? Is there another workaround?

  • 1
    Did you upgrade Xcode? If so, did you add the Command Line Tools?
    – yells
    Oct 23, 2013 at 9:08
  • Command Line Tools upgrade didn't help, but crysaz dirty hack helped.
    – user60143
    Oct 23, 2013 at 9:21

7 Answers 7


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.

  • You also need to poitconfigure to the Xcode provided tcl
    – mmmmmm
    Oct 23, 2013 at 12:52
  • A reinstall solved the problem (and several others :-)
    – Matteo
    Oct 23, 2013 at 14:36
  • 3
    @Mark: No, you don't, if you have run xcode-select --install. Doing so will install tclConfig.sh in /usr/lib, which is where the MacPorts configure script looks for it by default. Note that just installing Xcode and not running xcode-select --install is not enough!
    – neverpanic
    Oct 23, 2013 at 15:43
  • @neverpanic - +1 I think you just saved my day. Mar 19, 2014 at 9:52

My dirty hack was a symlink to system tar command.

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

I downloaded the sources from:


Compiled the usual GNU way:


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.



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

Quick solution:




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


variable tar_command "/usr/bin/tar -o"
  • this is probably why editing the corresponding entry in /opt/local/etc/macports/macports.conf does not solve the original poster's problem Mar 8, 2014 at 10:59

You can also install gnutar from Macports. That helped me to compile octave-devel, in particular one of its dependencies - atlas.

sudo port install gnutar
  • This is kind of recursive: MacPorts is complaining about the missing gnutar. To use MacPort to install gnutar I should be able to user MacPorts.
    – Matteo
    Oct 24, 2013 at 9:19
  • it DID work for me. MacPorts does not complain about gnu tar when you install it. It only complains when installing atlas. So before installing atlas you can install gnu tar with NO PROBLEM!
    – Denis
    Oct 28, 2013 at 13:06
  • 1
    It did not work for me. I got the error message while installing gnutar ...
    – Matteo
    Oct 28, 2013 at 13:17

"The problem is that your version of MacPorts was not built on Mavericks"

Full instructions can be found here: https://trac.macports.org/wiki/Migration

  • Welcome to Ask Different! While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – grg
    Feb 8, 2014 at 7:41
  • How does this differ from @neverpanic;s answer?
    – mmmmmm
    Feb 8, 2014 at 12:16
  • I originally followed his answer and later received new errors which eventually led me to find this Migration page. Now everything is working for me.
    – bazz
    Feb 9, 2014 at 16:54
  • He's right, the Migration instructions should be referenced. I've edited my answer to include them.
    – neverpanic
    Mar 4, 2014 at 0:02

Use Terminal.app (under /Applications/Utilities) and run the command:

sudo ln -s /usr/bin/bsdtar /usr/bin/gnutar
  • 1
    MacPorts is discouraging the hack: twitter.com/macports/status/393296788062355456
    – Matteo
    Oct 24, 2013 at 9:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .