After upgrading Mac OS X to newest version Mavericks, I attempted to selfupdate my Macports, but it failed:
$ sudo port -v selfupdate
---> Updating MacPo
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.
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
I had the same issue. I am assuming that you had Xcode command line utils installed previously. Just launch XCODE and let it finish configuration. Now rerun port command and it should work properly.
I mainly wanted to comment on @Brett's answer above (sorry, SO n00b still, not allowed) and share my experience upgrading... not really a new answer, but hopefully some useful info.
I downloaded and installed the Mavericks MacPorts installer as described above, (but without removing /opt, as suggested by @King Julian did self update
which was fine, and then upgrade outdated
and it seems to be uninstalling and reinstalling all my ports with a message:
Warning: Deactivate forced. Proceeding despite dependencies.
on each one. Luckily i made a copy of the etc and apache2/conf dirs, so should be able to get my config back when it eventually finishes... after 30 minutes or so it threw an error
Unable to open port: extra characters after close-quote
So i did self update
again and upgrade outdated
seems to run again...
So looks like it can be done (LAMP all working anyway) - it might have been quicker to start again from scratch, but make sure you have at least a couple of hours spare for this (and be connected to mains power ;)
Apologies if too much info, but hope it helps!
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
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