Gnutar not found during MacPorts operations in OS X Mavericks

root's picture

Gnutar not found during MacPorts operations.

fmbp:~ root# port -v upgrade outdated
--->  Extracting gperf
--->  Extracting gperf-3.0.4.tar.gz
sh: /usr/bin/gnutar: No such file or directory
gzip: error writing to output: Broken pipe

The permanent solutions is to reinstall MacPorts but there are other ways too. My favorite is:
Edit the variable tar_command from the files below from:
variable tar_command "/usr/bin/gnutar --no-same-owner"
to
variable tar_command "/usr/bin/tar -o"

Before:

fmbp:~ root# grep tar_command /opt/local/share/macports/Tcl/macports1.0/macports_autoconf.tcl
    variable tar_command "/usr/bin/gnutar --no-same-owner"
fmbp:~ root# grep tar_command /opt/local/share/macports/Tcl/port1.0/port_autoconf.tcl
	variable tar_command "/usr/bin/gnutar --no-same-owner"

After:

fmbp:~ root# grep tar_command /opt/local/share/macports/Tcl/macports1.0/macports_autoconf.tcl
    variable tar_command "/usr/bin/tar -o"
fmbp:~ root# grep tar_command /opt/local/share/macports/Tcl/port1.0/port_autoconf.tcl
	variable tar_command "/usr/bin/tar -o"

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root