Hi there,
I had the same problem installing wordpress locally using MAMP. It was fixed by opening up the install file properly.
I was originally trying to open it from this location:
THIS IS WRONG!
file:///Applications/MAMP/htdocs/wordpress/wp-admin/install.php
THIS ONE WORKS:
https://localhost:8888/wordpress/wp-admin/install.php
Idiot move, but wasted two hours of my life trying to figure out why I was getting your same error. Hopefully that saves someone else some time.