<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I recently performed an upgrade on my Ubuntu 12.04.5 LTS server:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The following was the upgrade info in the apt/history.log</div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">Start-Date: 2015-10-12 17:23:12</font></div><div class="gmail_default"><font face="monospace, monospace">Commandline: apt-get upgrade</font></div><div class="gmail_default"><font face="monospace, monospace">Upgrade: grub-legacy-ec2:amd64 (0.6.3-0ubuntu1.19, 0.6.3-0ubuntu1.22), libgtk2.0-common:amd64 (2.24.10-0ubuntu6.1, 2.24.10-0ubuntu6.2), postgresql-9.3:amd64 (9.3.9-1.pgdg12.4+1, 9.3.10-1.pgdg12.4+1), libldap-2.4-2:amd64 (2.4.28-1.1ubuntu4.5, 2.4.28-1.1ubuntu4.6), liblwgeom-2.1.7:amd64 (2.1.7+dfsg-3~94.git954a8d0.pgdg12.4+1, 2.1.8+dfsg-1~95.git18216c0.pgdg12.4+1), libcomerr2:amd64 (1.42-1ubuntu2.2, 1.42-1ubuntu2.3), libicu48:amd64 (4.8.1.1-3ubuntu0.5, 4.8.1.1-3ubuntu0.6), cloud-init:amd64 (0.6.3-0ubuntu1.19, 0.6.3-0ubuntu1.22), comerr-dev:amd64 (2.1-1.42-1ubuntu2.2, 2.1-1.42-1ubuntu2.3), postgresql-9.3-postgis-scripts:amd64 (2.1.7+dfsg-3~94.git954a8d0.pgdg12.4+1, 2.1.8+dfsg-5~97.git43a09cc.pgdg12.4+1), apport:amd64 (2.0.1-0ubuntu17.9, 2.0.1-0ubuntu17.11), libfreetype6:amd64 (2.4.8-1ubuntu2.2, 2.4.8-1ubuntu2.3), postgresql-client:amd64 (9.4+169.pgdg12.4+1, 9.4+170.pgdg12.4+1), e2fsprogs:amd64 (1.42-1ubuntu2.2, 1.42-1ubuntu2.3), postgresql-contrib-9.3:amd64 (9.3.9-1.pgdg12.4+1, 9.3.10-1.pgdg12.4+1), postgresql-plpython-9.3:amd64 (9.3.9-1.pgdg12.4+1, 9.3.10-1.pgdg12.4+1), udev:amd64 (175-0ubuntu9.9, 175-0ubuntu9.10), python-problem-report:amd64 (2.0.1-0ubuntu17.9, 2.0.1-0ubuntu17.11), postgresql-common:amd64 (169.pgdg12.4+1, 170.pgdg12.4+1), postgresql-client-9.3:amd64 (9.3.9-1.pgdg12.4+1, 9.3.10-1.pgdg12.4+1), postgresql-client-9.4:amd64 (9.4.4-1.pgdg12.4+1, 9.4.5-1.pgdg12.4+1), e2fslibs:amd64 (1.42-1ubuntu2.2, 1.42-1ubuntu2.3), libudev0:amd64 (175-0ubuntu9.9, 175-0ubuntu9.10), libpq-dev:amd64 (9.4.4-1.pgdg12.4+1, 9.4.5-1.pgdg12.4+1), postgresql-client-common:amd64 (169.pgdg12.4+1, 170.pgdg12.4+1), libpq5:amd64 (9.4.4-1.pgdg12.4+1, 9.4.5-1.pgdg12.4+1), python-apport:amd64 (2.0.1-0ubuntu17.9, 2.0.1-0ubuntu17.11), libss2:amd64 (1.42-1ubuntu2.2, 1.42-1ubuntu2.3), linux-libc-dev:amd64 (3.2.0-90.128, 3.2.0-91.129), logentries:amd64 (1.4.22, 1.4.23), libgtk2.0-bin:amd64 (2.24.10-0ubuntu6.1, 2.24.10-0ubuntu6.2), libgtk2.0-0:amd64 (2.24.10-0ubuntu6.1, 2.24.10-0ubuntu6.2), newrelic-sysmond:amd64 (2.1.0.124, 2.2.0.125)</font></div><div class="gmail_default"><font face="monospace, monospace">End-Date: 2015-10-12 17:23:52</font></div></div><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">After upgrading, the following error messages were in my application logs:</div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">django.db.utils.OperationalError: could not load library "/usr/lib/postgresql/9.3/lib/<a href="http://postgis-2.1.so">postgis-2.1.so</a>": <a href="http://liblwgeom-2.1.7.so">liblwgeom-2.1.7.so</a>: cannot open shared object file: No such file or directory</font></div><div style="font-family:verdana,sans-serif"><br></div></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">To fix the issue, I had to do the following</div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace"># dpkg --force-depends -r liblwgeom-2.1.7</font></div><div class="gmail_default"><font face="monospace, monospace"># apt-get install liblwgeom-2.1.7</font></div><div class="gmail_default"><font face="monospace, monospace"><div class="gmail_default">Start-Date: 2015-10-12 18:12:36</div><div class="gmail_default">Commandline: apt-get install liblwgeom-2.1.7</div><div class="gmail_default">Install: liblwgeom-2.1.7:amd64 (2.1.8+dfsg-1~95.git18216c0.pgdg12.4+1)</div><div class="gmail_default">End-Date: 2015-10-12 18:12:38</div><div class="gmail_default"><br></div></font></div><div class="gmail_default"><font face="monospace, monospace"># dpkg -r postgresql-9.3-postgis-2.1</font></div><div class="gmail_default"><font face="monospace, monospace"># dpkg -r postgresql-9.3-postgis-scripts</font></div><div class="gmail_default"><font face="monospace, monospace"># apt-get install postgresql-9.3-postgis-2.1</font></div><div class="gmail_default"><font face="monospace, monospace"># apt-get install postgresql-9.3-postgis-scripts</font></div><div class="gmail_default"><div class="gmail_default" style="font-family:monospace,monospace">Start-Date: 2015-10-12 18:16:25</div><div class="gmail_default" style="font-family:monospace,monospace">Commandline: apt-get install postgresql-9.3-postgis-2.1</div><div class="gmail_default" style="font-family:monospace,monospace">Install: liblwgeom-2.1.8:amd64 (2.1.8+dfsg-5~97.git43a09cc.pgdg12.4+1, automatic), postgresql-9.3-postgis-scripts:amd64 (2.1.8+dfsg-5~97.git43a09cc.pgdg12.4+1, automatic), postgresql-9.3-postgis-2.1:amd64 (2.1.8+dfsg-5~97.git43a09cc.pgdg12.4+1)</div><div class="gmail_default" style="font-family:monospace,monospace">Remove: liblwgeom-2.1.7:amd64 (2.1.8+dfsg-1~95.git18216c0.pgdg12.4+1)</div><div class="gmail_default" style="font-family:monospace,monospace">End-Date: 2015-10-12 18:16:28</div></div></div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">It is almost as if the dependency of postgresql-9.3-postgis-2.1 was incorrect with liblwgeom-2.1.7 or that postgresql-9.3-postgis-2.1 needed to be upgraded, but apt-get upgrade didn't upgrade it in the first place.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br style="color:rgb(136,136,136);font-size:12.8px"><div style="color:rgb(136,136,136);font-size:12.8px"><div dir="ltr"><table width="480" border="0" cellpadding="0" cellspacing="0" style="line-height:18px;font-family:'Helvetica Neue',HelveticaNeue,Helvetica,Arial,'sans serif';font-size:13px;color:rgb(51,51,51)"><tbody><tr><td height="7" style="font-family:arial;font-size:small;line-height:normal"></td><td width="406" rowspan="2" style="font-family:arial;font-size:small;line-height:normal;padding-top:6px"><span style="font-weight:bold">Mike Brannigan</span> - Senior DevOps Engineer <br>C: <font color="208cd8"><a value="+13026901864" style="color:rgb(34,34,34)">630.347.2698</a> </font><br><a href="http://spothero.com/" style="color:rgb(17,85,204)" target="_blank"><font color="#208cd8"><span style="line-height:18px">www.spothero.com</span></font></a> <span style="color:rgb(32,140,216);line-height:18px">| </span><a href="https://twitter.com/SpotHero" style="color:rgb(17,85,204)" target="_blank"><font color="#208cd8"><span style="line-height:18px">@</span></font><u style="color:rgb(32,140,216);line-height:18px">SpotHero</u></a><span style="color:rgb(32,140,216);line-height:18px"> |</span><span style="color:rgb(32,140,216);line-height:18px"> </span><a href="https://www.linkedin.com/in/mikebrannigan" style="color:rgb(32,140,216);line-height:18px" target="_blank">LinkedIn</a></td></tr><tr><td width="74" style="font-family:arial;font-size:small;line-height:normal"><img src="http://blog.spothero.com/wp-content/uploads/2013/04/SH-Car-Icon-small.png" width="61" height="61" border="0" style="border: 0px;"></td></tr></tbody></table><div style="font-size:13.3333px"><br></div><div style="font-size:13.3333px">Don't have the free SpotHero app?</div><div style="font-size:13.3333px"><a href="https://itunes.apple.com/us/app/spothero-parking-best-parking/id499097243?mt=8" style="color:rgb(17,85,204)" target="_blank"><font color="#6fa8dc">iPhone Download</font></a> | <font color="#3d85c6"><a href="https://play.google.com/store/apps/details?id=com.spothero.spothero" style="color:rgb(17,85,204)" target="_blank">Android Download</a></font></div></div></div></div></div></div></div></div>
</div>