Tcl/Tk Aqua Breaks MacPorts
Have you seen this?
[~]: sudo port -d sync
can’t find package Pextlib 1.0
while executing
“package_native require Pextlib 1.0″
(”eval” body line 1)
invoked from within
“eval package_native $args”
(procedure “package” line 14)
invoked from within
“package require Pextlib 1.0″
(procedure “dportinit” line 315)
invoked from within
“dportinit ui_options global_options global_variations”
Error: /opt/local/bin/port: Failed to initialize ports system, can’t find
package Pextlib 1.0
Well, I did.
Turns out, I had recently installed the Tcl/Tk Aqua (Batteries Included) distribution and apparently it breaks the MacPorts subsystem. Hopefully you backed up the old binaries for tclsh and wish in /usr/bin (like I did) by moving them to tclsh8.4.7 and wish8.4.7. I was able to (briefly) get the port command working long enough to do a selfupdate by changing the script to call the tclsh8.4.7 binary. Unfortunately, that was not sufficient to fix the problem and resulted in more breakage. Luckily there is an uninstall command on the disk image for the Tcl/Tk installer and after running it (and the linking tclsh and wish to the 8.4.7 binaries I preserved above) my port command was back.
[composed and posted with ecto]
Your best bet would probably to use something like Pacifist to extract the original binaries from the OSX install DVD. If you can’t do that, maybe a clean install to an external USB or Firewire drive and copy the binaries over.