InitDB.pl - failed query

I am trying to rebuild a musicbrainz server (as I was having some weird permissions issue on my last build trying to get the slave.sh to run in cron)

So i have spun up a new Linux Vm (on Hyper V), installed all the prerequisites (as per the install.md file)

but when i go to run the InitDb.pl and import the data it fails, when trying to run the version check query

Failed Query: ‘SELECT current_settings(‘server_version_num’)’
()
then doesn’t create the database so throw a series of errors about it not having correct username passwords
I have confirmed i have postgreSQL 9.5 installed and the syntax of the query appears correct.

Any idea why the query fails?

At this point i cannot continue the build, i’ve tried commenting out that section in the script but it still doesn’t work