Fixing broken Macports

rebra picture rebra · Dec 2, 2008 · Viewed 19.6k times · Source

I just tried (for the first time, I might add) a

port upgrade installed

in Macports, and I'm afraid I might come to regret it: A lot of errors -- specially regarding X11 and Python.

Here's a typical error message regarding python:

---> Activating python24 2.4.5_4+darwin_9 Error: Activating python24 2.4.5_4 failed: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4 already exists and does not belong to a registered port. Unable to activate port python24.

My question: Should I expect a bit of trouble? And: Any hints on fixing these errors?

I did do "sync" and "selfupdate" before upgrading.

Answer

casademora picture casademora · Dec 2, 2008

Usually, when my macports installation starts going nutty (usually because I goofed it up), I delete the /opt folder and reinstall. I'm just lazy, i guess. From what it looks like though, you are trying to reinstall a new port over an old/existing folder.

Have you tried Porticus? It will do a good job of telling you which ports are installed and active. Perhaps if you deactivated a current python port, and installing the new one, that can get you moving again.