And that’s incredibly annoying. Every time I work on a new computer it eventually happens. Same for python really, I remember having to unlink python several times a day at some point because it kept relinking a broke binary as a dependency of nvim.
Could there be some kind of “This is homebrew’s btw” notice when some of its binaries are executed? Or just renaming it to brew_pkg-config by default?
It’s obnoxious in python’s and pkg’s specific cased because:
-pkg-config manages system dev libraries. Cue to spending hours trying to find out why make is failing because the only times I ever am reminded pkg-config exists is when this issue pops up, like clockwork, in fresh installs. And brew just doesn’t have the width of libraries available to justify using it instead of the system’s.
-Python also is a program that tends to have a ton of libraries installed systemside, which brew’s ignores. I imagine to avoid nightmarish dll-hell scenarios.
I hate to say this when reporting issues about software, but I can’t think of any clean solution to the issue as much as I dislike it. Renaming the binary would break scripts, adding that notice I mentioned would also break scripts that parse said output. Maybe sending it to STDERR or some other stream?