If you installed MacPorts using the package installer, skip this section. To install MacPorts from the source code, follow the steps below.
1. Download and extract the MacPorts 2.2.1 tarball. Either do so using your browser and the Finder, or use the given commands in a terminal window.
curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.2.1.tar.bz2
tar xf MacPorts-2.2.1.tar.bz2
2. Afterwards, perform the commands shown in the terminal window. If you wish to use a path other than /opt/local, follow the instructions for installing multiple copies of MacPorts instead.
MacPorts-2.2./
./configure
make
sudo make install
err description:
I’ve just upgraded my Mac OS X to Mavericks 10.9. When I tried to update Macports I got an error and when I used the verbose mode of selfupdate (sudo port -v selfupdate) it came out this:
macports checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions
I fixed the problem after reinstalling the Command Line Tools of Xcode and accepting the license from the command line:
sudo xcode-select --install
sudo xcodebuild -license
Then the selfupdate worked just fine:
sudo port selfupdate
参考资料: