# port selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
---> Updating the ports tree
---> Updating MacPorts base sources using rsync
MacPorts base version 1.9.2 installed,
MacPorts base version 2.0.3 downloaded.
---> MacPorts base is outdated, installing new version 2.0.3
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)
so WTF!
after surfing a while learned that after upgrading to OS X Lion the MacPorts seems to have problems AKA doesn't work anymore, there are a few guides to upgrade it out there but as for sanity, I'd rather get it uninstalled.
1) got a list of all your ports:
# port -qv installed > AllMyPorts.txt , you can use porticus as well, its up to you
2) Try to uninstall all the ports:
#port -f uninstall --follow-dependents installed
too many nested evaluations (infinite loop?)
Log for atk is at: /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_atk_1.32.0_0/main.log
Warning: Failed to execute portfile from registry for atk @1.32.0_0
too many nested evaluations (infinite loop?)
that didnt work so:
# sudo port -f uninstall installed (not the ideal but it eventually remove all the dependencies)
3) at this point you will no longer have MacPorts installed so download the new version for Lion (2.0.3)
4) Eventually you will get an error message when installing saying that xCode is not installed or was installed with UNIX development (10.5+) so go and download xCode4 (Apple Store, its free no worries), once the AppleStore says "Installed" you need to actually install it! so go to Applications then look for xCode4 and install it and give it a try again to the MacPorts installer.