macosmacportsosx-tiger

Uninstalling macports when 'port' doesn't work


I've been trying to install a few dependencies for an application I'm running and I'm worried I might have broken the dev environment. I'm running this program on a MacBook (OSX Tiger, I don't have access to a newer one). MacPorts is officially broken, returning this error when I try and run any command:

 sqlite error: near "ADD": syntax error (1) while executing query: ALTER TABLE registry.files ADD COLUMN binary bool
    while executing 
"registry::open $db_path"
    (procedure "mportinit" line 633)
    invoked from within
"mportinit ui_options global_options global_variations"

Seeing as this happens on any port __ command, I can't use the standard way of uninstalling MacPorts. However, given that I'm the one who got it in this condition in the first place, I'd rather not root around myself without knowing what I'm doing.

  1. Is this problem fixable? Just in the interests of my own knowledge, does anyone know what exactly could have caused this error or what it actually means in terms of macport's functioning?

  2. How can I (assuming this is necessary/a good idea) thoroughly uninstall macports? I'd rather not have to go through the trouble of reinstalling all my ports afterwards, but it's better than what I've got now.


Solution

  • MacPorts will usually still work on older versions of Mac OS X as the developers do not intentionally break compatibility. MacPorts officially only supports the latest release of Mac OS X and the one before (at the time of this writing this is 10.7 Lion and 10.6 Snow Leopard).

    However, according to your report here, the latest MacPorts 2.1.0 upgrade seems to have compatibility problems with Mac OS X 10.4 Tiger. As indicated in the error message above, the older SQLite library version does not seem to understand the ALTER TABLE ... ADD COLUMN syntax used to update the port registry.

    For this case, I assume only the upgrade procedure itself is affected and normal operation would work. This procedure is supposed to bring your MacPorts registry to a newer version required for the new features added in this release. Creating a new, empty registry would probably still work. However, this requires a full reinstall of MacPorts and all of your ports.

    Please follow the uninstall instructions, but skip the first command as port cannot be executed anymore. This might leave some traces of ports installing to system locations, but in most cases this works fine. Afterwards, install MacPorts from source using the installation instructions in the guide.