Issue on a windows laptop that was causing the `db:create` command to fail with the above error message.
Initial ways to try solve the issue involved restarting the Postgres database with:
sudo service postgresql restart
This did not work. The solution which worked in our case was to update the wsl to version 2:
wsl --set-version Ubuntu-22.04 2
This command needs to be run in the ubuntu terminal.
Once this was updated everything was able to run without errors