MagicMake
github.com
github.com
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc
However, there are quite a few additional packages required if wanting to build with all options/features. These are the ones found by magicmake:
liblog-agent-perl lcov systemtap-sdt-dev llvm clang pkg-config libicu-dev libxml2-dev liblz4-dev libreadline-dev bison flex python-is-python3 zlib1g-dev libkrb5-dev libssl-dev libgss-dev libpam0g-dev libxslt1-dev libldap2-dev libsystemd-dev gettext tcl tcl-dev libperl-dev libpython3.8-dev libipc-run-perl dbtoepub fop libxml2-utils xsltproc libterm-table-perl libterm-readkey-perl libterm-size-any-perl
[1] https://wiki.postgresql.org/wiki/Compile_and_Install_from_so...