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.
Confirm that MacPorts is installed by typing "which port" and verifying that it returns /opt/local/bin/port. If not, see below on adding the MacPorts bin to your shell path.
MacPorts, formerly called DarwinPorts, is a package management system that simplifies the installation of software on the macOS and Darwin operating systems. It is an open-source software project that aims to simplify the installation of other open source software.
If no archive is available, MacPorts will fall back to building from source. This can happen for a number of reasons: Each port is only prebuilt with its default set of variants. So if you specify different variants when installing, the port will be built from source.
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.
If, as the error message indicates, that file exists in the /opt directory and does not belong to a registered port, you'd have to wonder how it got there. Maybe left over from a previous, possibly botched, installation?
Either way, I don't see the harm in just deleting the file in question (and, from the looks of it, probably the entire /opt/local/Library/Frameworks/Python.framework/Versions/2.4 directory)
Generally speaking, to resolve problems like this you should contact the port maintainer, or ask on the macports mailing list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With