That is the problem.
I mentioned in an earlier post that you should check which shell is being used when you run ./build, and I specifically mentioned:
I’m not sure why you would choose to omit this, it’s quite important.
zsh
is a second class citizen on Debian. If you want to use it, then you need to set PATH manually yourself. OSMC will only fully and officially support a BusyBox shell interpreter and Bash