Opened 22 months ago
Last modified 22 months ago
#71408 new defect
xmlcatmgr @2.2_1: Image error: /opt/local/bin/xmlcatmgr already exists and does not belong to a registered port.
| Reported by: | thetrial (alabay) | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.10.5 |
| Keywords: | legacy-os, sierra | Cc: | |
| Port: | xmlcatmgr, docbook-xml-4.2 |
Description
Image error: /opt/local/bin/xmlcatmgr already exists and does not belong to a registered port. Unable to activate port xmlcatmgr. Use 'port -f activate
After I tried to force activation, my MacPorts database was corrupted, so I had to replay the whole /opt directory. I don’t understand, why this error occurs and question, if there is a bug.
Attachments (1)
Change History (3)
Changed 22 months ago by thetrial (alabay)
comment:1 Changed 22 months ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 22 months ago by thetrial (alabay)
Well, this was quite a strange thing. I had to remove and remove and remove some things (seems, all were related to each other), and I’m not sure, where these come from or why and when MP might have lost track. I haven’t installed anything from outside MP to /opt. The stuff seems to having dated back to 2002 … and yes, I use MP for a very long time – but I’ve had re-setup MP once or twice, and I had several OS updates. On my second computer all this did not happen. It looked like all the xml and xsl stuff was problematic. Finally a big reclaim was necessary, also cleaning away some ccache things that might have stood in the way. At least, all ran through, and now there is no corruption indicated.
To remove and reinstall MP and its ports would be nice. But I guess I can’t do that anymore. The problem is, that MP seems not to have an intelligent system to install the "last possible" version of something, according to the underlying system. I still have an old owncloud-client and, above all, wine running. Those two programs would get lost. I can’t afford that. And that’s a serious problem.

Such a message is not usually caused by a MacPorts bug but by a problem on your computer. The message means a file MacPorts wants to install is already there and MacPorts does not have a record of having installed it; you would need to figure out why it exists on your computer if it didn't come from MacPorts.
One somewhat common way for this to happen is if you ran a third-party software installer that was itself built with MacPorts in its default prefix of /opt/local. Files installed by such an installer would not be known to your MacPorts install and would even overwrite any files your MacPorts had already installed. You could use
ls -l /opt/local/bin/xmlcatmgrto see when the file was modified, which is probably when it was installed; maybe that reminds you of a software installer that you ran at that time. Cleaning up from such a mess can be tricky. Easiest is probably to uninstall the third-party software (if they provide an uninstall method), remove all traces of MacPorts including unknown files in /opt/local, and then reinstall MacPorts and the ports you want. Also request that the distributors of the third-party installer withdraw all installers they built that install into /opt/local and to rebuild their installers with their copy of MacPorts built from source in a different prefix specific to their software.Other causes of the message are possible but less likely. For example, if you manually created the file /opt/local/bin/xmlcatmgr it would cause this message, but I imagine you probably wouldn't do that. Or you might've used MacPorts to install the xmlcatmgr port and then MacPorts lost track of the fact that it had installed it, for example if its registry database were corrupted or removed.