title: postgresql error: undefined symbol: GEOSClipByRect in django
body: <p>when i migrate in django<br>the django have return error below<br></p>
  
  <pre><code>$ python manager.py migrate
  </code></pre>
  
  <blockquote>
    <p>django.db.utils.InternalError: could not load library "/usr/lib/postgresql/9.6/lib/postgis-2.3.so": /usr/lib/liblwgeom-2.3.so.0: undefined symbol: GEOSClipByRect</p>
  </blockquote>
  
  <p>i researched many posts but not found any solution.<br>
  Does anyone know the solution?<br>
  my system info is below<br><br><br></p>
  
  <pre><code>$ lsb_release -a
  </code></pre>
  
  <blockquote>
    <p>Distributor ID:   Ubuntu<br>
    Description:    Ubuntu 16.04.2 LTS<br>
    Release:    16.04<br>
    Codename:   xenial</p>
  </blockquote>
  
  <p><br><br></p>
  
  <pre><code>$ dpkg -l | grep postgres
  </code></pre>
  
  <blockquote>
    <p>ii  postgresql-9.6                     9.6.2-1.pgdg16.04+1                        amd64        object-relational SQL database, version 9.6 server<br>
    ii  postgresql-9.6-pgrouting           2.3.2+ds-2.pgdg16.04+1                     amd64        Routing functionality support for PostgreSQL/PostGIS<br>
    ii  postgresql-9.6-pgrouting-scripts   2.3.2+ds-2.pgdg16.04+1                     all          Routing functionality support for PostgreSQL/PostGIS - scripts<br>
    ii  postgresql-9.6-postgis-2.3         2.3.2+dfsg-1~exp2.pgdg16.04+1              amd64        Geographic objects support for PostgreSQL 9.6<br>
    ii  postgresql-9.6-postgis-2.3-scripts 2.3.2+dfsg-1~exp2.pgdg16.04+1              all          Geographic objects support for PostgreSQL 9.6 -- scripts<br>
    ii  postgresql-client-9.6              9.6.2-1.pgdg16.04+1                        amd64        front-end programs for PostgreSQL 9.6<br>
    ii  postgresql-client-common           180.pgdg16.04+1                            all          manager for multiple PostgreSQL client versions<br>
    ii  postgresql-common                  180.pgdg16.04+1                            all          PostgreSQL database-cluster manager<br>
    ii  postgresql-contrib                 9.6+180.pgdg16.04+1                        all          additional facilities for PostgreSQL (supported version)<br>
    ii  postgresql-contrib-9.6             9.6.2-1.pgdg16.04+1                        amd64        additional facilities for PostgreSQL<br></p>
  </blockquote>
  
  <p><br><br></p>
  
  <pre><code>$ dpkg -l | grep postgres
  </code></pre>
  
  <blockquote>
    <p>ii  postgis                            2.3.2+dfsg-1~exp2.pgdg16.04+1              amd64        Geographic objects support for PostgreSQL<br>
    ii  postgis-doc                        2.3.2+dfsg-1~exp2.pgdg16.04+1              all          Geographic objects support for PostgreSQL -- documentation<br>
    ii  postgresql-9.6-postgis-2.3         2.3.2+dfsg-1~exp2.pgdg16.04+1              amd64        Geographic objects support for PostgreSQL 9.6<br>
    ii  postgresql-9.6-postgis-2.3-scripts 2.3.2+dfsg-1~exp2.pgdg16.04+1              all          Geographic objects support for PostgreSQL 9.6 -- scripts<br></p>
  </blockquote>