UPDATE – The 10.9 Mavericks binary is now available here.
If you try installing or updating MacPorts ports after upgrading OS X to 10.9, you’ll hit an error with gnutar:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mbp:tar-1.27 chriskief$ sudo port upgrade outdated | |
—> Extracting apr | |
Error: org.macports.extract for port apr returned: command execution failed | |
Please see the log file for port apr for details: | |
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_apr/apr/main.log | |
Error: Unable to upgrade port: 1 | |
To report a bug, follow the instructions in the guide: | |
http://guide.macports.org/#project.tickets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:debug:extract Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_apr/apr/work" && /usr/bin/bzip2 -dc '/opt/local/var/macports/distfiles/apr/apr-1.4.8.tar.bz2' | /usr/bin/gnutar –no-same-owner -xf -' | |
:debug:extract Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_apr/apr/work" && /usr/bin/bzip2 -dc '/opt/local/var/macports/distfiles/apr/apr-1.4.8.tar.bz2' | /usr/bin/gnutar –no-same-owner -xf – | |
:info:extract sh: /usr/bin/gnutar: No such file or directory |
The recommended fix from MacPorts is to reinstall MacPorts and all ports after a major OS upgrade. Unfortunately there is no binary for Mavericks yet and quite a few ports are failing to build right now including MySQL 5.6 and Python 2.7.
The  workaround is to keep your current MacPorts installation and install gnutar from source:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://ftp.gnu.org/gnu/tar/tar-1.27.tar.gz | |
tar xzvf tar-1.27.tar.gz | |
cd tar-1.27 | |
./configure | |
make | |
sudo mv ./src/tar /usr/bin/gnutar |
This is definitely not a long term solution and should really just be used for new ports that are must haves. I wouldn’t run port upgrade outdated
or try to upgrade any specific ports as you will find that not all ports will build.
Once a Maverick’s binary is out, be sure to remove this gnutar before doing the migration.
Read more discussion of MacPorts on Mavericks.
Note: Be sure to build and install gnutar from source and not just symlink…
thanks for this note, clears up a couple of days of struggle