title: How to install postgis for postgresql 9.6
body: <p>I want to install Postgres 9.X and Postgis for it. 
  I manage to install Postgres with version 9.6 with this command:</p>
  
  <pre><code>sudo apt-get install postgresql-9.6
  </code></pre>
  
  <p>But then when I type:</p>
  
  <pre><code>sudo apt get install postgis
  </code></pre>
  
  <p>I suddenly get postgres 10 and postgis for that version. </p>
  
  <p>When I try something like on this link <a href="http://technobytz.com/install-postgis-postgresql-9-3-ubuntu.html" rel="nofollow noreferrer">http://technobytz.com/install-postgis-postgresql-9-3-ubuntu.html</a> my installation failed, I get this code in terminal:</p>
  
  <pre><code>Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:
  
   The following packages have unmet dependencies:
   postgresql-9.3-postgis-2.1 : Depends: libgdal1 (&gt;= 1.9.0) but it is not going to be installed
                            Depends: libgeos-c1 (&gt;= 3.3.3) but it is not going to be installed
                            Depends: liblwgeom-2.1.8 (&gt;= 2.1.6) but it is not going to be installed
                            Depends: libproj0 but it is not installable
                            Recommends: postgresql-contrib-9.3 but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.
  </code></pre>
  
  <p>I am using Ubuntu 18.04</p>