How do I do that? The normal installers (with
.pkg files) ask for a root password. It is possible to run normal mac software without root access, but how do I run and install this shell software?
You can compile it yourself or use HomeBrew, that doesn't require root access.
Compile it elsewhere on a Mac where you do have the necessary tools installed. Move the binary over to the other machine.