Can't update Macports (with Mac OS X Mavericks)

Solution 1:

Install the "Command Line Tools" first:

sudo xcode-select --install

(Explicitly agreeing to the license is sometimes necessary via "sudo xcodebuild -license")

Then upgrade the ports:

sudo port -v selfupdate

Solution 2:

I answered a similar question. The location of the Tcl framework has changed, breaking the existing MacPorts infrastructure. The 2.2.1 installer for Mavericks has since become available here. Make a list of your installed ports, and consider deleting /opt/local prior to installing. You will likely need to 'update' everything anyway.

Solution 3:

There might be a chance that you haven't agreed with the XCode license. If xcode-install doesn't help, you can run the belowing command to agree with Xcode license. sudo xcodebuild -license

Solution 4:

there is an actual bug with

gperf @3.0.4: error: expected parameter declarator

thankfully this issue has its own ticket at MacPorts ticket 40918

if anything you could read all the issues in Mavericks at http://trac.macports.org/wiki/MavericksProblems