Hi Prabhleen, and welcome to our community!
First things first: for IRC, there is a web-based client you can use: https://webchat.freenode.net/#metabrainz
If that doesn’t work, I suggest installing an IRC client on your computer.
Is it possible that your network blocks the connection?
Now for installing Postgres, I had a look at the error you mentioned. It seems to me (correct me if I’m wrong) that you are using Windows, in which case the command sudo apt-get…
certainly won’t work, as it is meant for Linux users
Head here for Windows download instructions: https://www.postgresql.org/download/windows/
Overall, here’s what I would suggest: run the dependencies (Postgres, ElasticSearch and Redis) using Docker (as described here), while running the webserver locally (outside of Docker. This is described here).
In my opinion that’s the easiest way to run you local development, and the one I use myself.
Good luck with the continuation, and let us know if you got yourself set up !