Im having exactly the same issue.
Ive tried upgrading PS8.1 to 9 which fails the upgrade.
Ive also tried clean installs of PS9 on PHP8.1, 8.2 & 8.4 and they all result in this same error
P8.1 installs fine on this server so unless the requirements have changed significantly I am stuck as to why it wont install, or update.
And ironically, the PS9 early release installed fine on this same server lol