Install PostGIS on Ubuntu 14.04

I ran into this error after installing just the package postgis on Ubuntu 14.04:

ERROR: could not open extension control file "/usr/share/postgres/9.1/extension/postgis.control": No such file or directory

To resolve this, just install the other necessary packages:

sudo apt-get install postgresql-9.3-postgis-2.1 \
postgresql-9.3-postgis-2.1-scripts postgis
RecentsNearby