[FIX] Fix build.
Use postgres archive repo: https://apt-archive.postgresql.org/
Install the latest version of mercuriar that supports python 2.7: https://www.mercurial-scm.org/wiki/SupportedPythonVersions#:~:text=Mercurial%205.2%20and%20newer%20has,and%20Python%203.5%20and%20newer.