I think the package postgis from the ubuntu repo will install everything you need, as explained in the last lines of https://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21UbuntuPGSQL93Apt