I have a build system that relies on the "realpath" utility. However, after upgrading to Ventura, a new "realpath" was added to /bin and, unfortunately, it doesn't support the option my build system uses (--s). Is it possible to change the order of how utilities are found in the path or to change /bin/realpath to point to the one that works? I looked into disabling the SIP, but that seemed a bit heavy handed.
Asked
Active
Viewed 700 times
1 Answers
3
You can't change anything in /bin. Apple now provides the system on a sealed volume.
The correct solution is to fix the build files so that they do not use an non usual argument.
However you can use the $PATH environment variable to find a GNU realpath by installing that program and having its directory on the PATH before Apple's directories.
The easiest way is use a package manager like MacPorts or HomeBrew.
Although read this SuperUser answer to see that there might not be a common way to fix this as the command line realpath is not standardized at all

mmmmmm
- 30,160
realpath
binaries in your deployment scripts. – nohillside Jan 13 '23 at 14:04realpath
. But to address the question, you just change the order of directories in your PATH variable, – Allan Jan 14 '23 at 16:24/bin/realpath
is a recent addition and doesn't support-s
. I assume the OP had the GNU version ofrealpath
installed via Homebrew but/bin
early in the path (which worked as long as macOS didn't include its ownrealpath
). – nohillside Jan 14 '23 at 16:40