The error means that the Postgres server is not running. Try starting it:
sudo systemctl start postgresql
I believe the service name is postgresql, but if that doesn’t work, try typing
sudo systemctl start postgres
and pressing tab to auto-complete.
Make sure that the server starts on boot:
sudo systemctl enable postgresql