Mac : MacPorts selfupdate failed on OSX Mavericks

By | October 24, 2013

Upgraded to Mac OSX Mavericks lately? Well, you’ll need to update MacPorts once you’re done to keep it working.

To update MacPorts, just do the following command in Terminal :

sudo port -v selfupdate

The terminal will keep working running a bunch of scripts by itself, then you end up with the following output error :

Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make && make install SELFUPDATING=1

Exit code: 77
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed

This mean you need to update Xcode and install the “command line developer tools”… just do :

sudo xcode-select --install

You will be prompt the following message :

xcode-select: note: install requires for command line developer tools. Would you like to install the tools now?

Simply click “Install” and you’re through!