Strange behaviour of soft link on Big Sur

Viewed 72

The following is a copy of a simple terminal session on Mac OS Big Sur 11.4:

1 ~> date
Fri Jul  2 20:16:45 EDT 2021
2 ~> which gmake
3 ~> ll /usr/local/bin/gmake
ls: /usr/local/bin/gmake: No such file or directory
4 ~> /usr/bin/gnumake --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
5 ~> sudo ln -s /usr/bin/gnumake /usr/local/bin/gmake
Password:
6 ~> ll /usr/local/bin/gmake
lrwxr-xr-x  1 root  admin  16 Jul  2 20:17 /usr/local/bin/gmake -> /usr/bin/gnumake
7 ~> /usr/bin/gnumake --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
8 ~> /usr/local/bin/gmake --version
gmake: error: Failed to locate 'gmake'.
xcode-select: Failed to locate 'gmake', requesting installation of command line developer tools.

And a little window pops up, giving me the choice to install or cancel. (In this session I cancelled. When I choose install it will succeed after several minutes, but if I invoke usr/local/bin/gmake again, the same thing will happen again.)

How is this even possible?

FWIW, the command line tools are already installed:

9 ~> xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Any explanation of this phenomenon would be greatly appreciated.

0 Answers
Related