MacPorts missing links

David Epstein David.Epstein at warwick.ac.uk
Sat Sep 10 10:42:15 PDT 2016


I gave the command:

ls -l /opt/local/bin/py*
and the system replied:

> lrwxr-xr-x  1 root  wheel  23  9 Jun 19:13 /opt/local/bin/pydoc@ -> /opt/local/bin/pydoc2.7
> lrwxr-xr-x  1 root  wheel  23  9 Jun 17:19 /opt/local/bin/pydoc3@ -> /opt/local/bin/pydoc3.5
> lrwxr-xr-x  1 root  wheel  24  9 Jun 19:13 /opt/local/bin/python@ -> /opt/local/bin/python2.7
> lrwxr-xr-x  1 root  wheel  31  9 Jun 19:13 /opt/local/bin/python-config@ -> /opt/local/bin/python2.7-config
> lrwxr-xr-x  1 root  wheel  24  9 Jun 17:19 /opt/local/bin/python3@ -> /opt/local/bin/python3.5
> lrwxr-xr-x  1 root  wheel  31  9 Jun 17:19 /opt/local/bin/python3-config@ -> /opt/local/bin/python3.5-config
> lrwxr-xr-x  1 root  wheel  25  9 Jun 17:19 /opt/local/bin/python3m@ -> /opt/local/bin/python3.5m
> lrwxr-xr-x  1 root  wheel  32  9 Jun 17:19 /opt/local/bin/python3m-config@ -> /opt/local/bin/python3.5m-config
> lrwxr-xr-x  1 root  wheel  25  9 Jun 19:13 /opt/local/bin/pythonw@ -> /opt/local/bin/pythonw2.7
> lrwxr-xr-x  1 root  wheel  25  9 Jun 17:19 /opt/local/bin/pyvenv@ -> /opt/local/bin/pyvenv-3.5

You will see that none of the files on the righthand side of the arrow -> appears on any lefthand side. I tried “port provides” on both lefthand and righthand sides and received error messages from port such as
> /opt/local/bin/pydoc2.7 does not exist.

and
> /opt/local/bin/pydoc is not provided by a MacPorts port.


How do I get rid of the symbolic links, other than using /bin/rm, something I have been told never to do?

How can I find all hanging links like this in /opt? Presumably there is a clever formula using unix find.

I wonder what causes this kind of problem? I cannot remember any of my port processes terminating incorrectly. I have lately been uninstalling python-related ports, because I had too many different versions of python on my machine, and I was getting confused.

David Epstein








More information about the macports-users mailing list