Installing root with XCode 14 on MacOS 12.6

It seems something similar was already answered here: