Installing tryton(d) 5.2* on ubuntu 18.04.3 with postgres 11 for newbys by newby

As you run sudo from root without loading shell specification, the $HOME stays the root home. And as psql needs to write on the home directory, it fails because postgres user has no write permission on this directory.
Indeed you must run sudo -i -u postgres psql to force loading the shell specification.

Use the docker image like @pokoli sugested this is a the simplest way.
Installing tryton on a specific OS manually requires knowledge in UNIX, Python, PostgreSQL etc.