I ran port selfupdate and MacPorts tried to upgrade itself to version 2.2.1, but eventually fails. When I add the -v flag, I can see the build fails after these lines:

checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions
Command failed: cd     /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc OBJC=/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 SELFUPDATING=1 && make install SELFUPDATING=1
Exit code: 1

How can I get MacPorts back?


You need to update the command line tools Xcode installs. For whatever reason, Xcode doesn't seem to want to update them itself, but you can force it by running xcode-select --install. This will pop open a GUI prompt; select "Install" and let the installer do its thing. After this, MacPorts should build itself successfully. (You may need to rehash first; rehash in tcsh, hash -r in bash and zsh (I think).)


I installed the ActiveTCL distribution from Active State. I vaguely recalled it was necessary; I just bought a new machine, has Mavericks, and I put the ActiveState TCL distro on it as a matter of habit prior to rebuilding my MacPorts install.

  • So it had Mavericks out-of-the-box, right? You didn't need to upgrade? I'd imagine the circumstances are a bit different, from the problem I was having, then. Oct 30 '13 at 17:58
  • Installing ActiveTCL is certainly not necessary for MacPorts. It might not even be a suitable Tcl, because MacPorts currently does not work with MacPorts.
    – neverpanic
    Nov 5 '13 at 8:19

You must log in to answer this question.

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