I am trying to update MacPorts but get the following error.

sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.1.1 installed,
MacPorts base version 2.1.2 downloaded.
--->  Updating the ports tree
--->  MacPorts base is outdated, installing new version 2.1.2
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl

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

When I follow https://trac.macports.org/wiki/Migration

At stage 3 I get the following error. Is this important or can I continue with it?

Error: Unable to open port: can't read "build.pre_args": can't read "build.cmd": Failed to locate 'gnumake' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
  • 7
    Is it possible that you haven't installed the Xcode command line tools on ML yet? I think MacPorts depends on those. Aug 1, 2012 at 19:04
  • 1
    Adding to Nathan Greenstein's answer: Check this: trac.macports.org/wiki/Migration: Migrating a MacPorts install to a new major OS version or CPU architecture
    – lupincho
    Aug 1, 2012 at 19:43
  • Nathan Greenstein answered you 14 months ago... please click Accept.
    – smci
    Oct 5, 2013 at 8:37

1 Answer 1


Based on the error in your update, it appears that (as Nathan said) you haven't installed the Xcode commandline tools yet. You should be able to finish the update process after you've done that.

You must log in to answer this question.

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