I recently got PostGIS upgraded to version 2.2.2. I would like to upgrade a legacy database to this new version, running this query:
alter extension postgis update to "2.2.2"
The result is this error:
ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.2.so": /usr/lib/x86_64-linux-gnu/libSFCGAL.so.1: undefined symbol: _ZN5osgDB13writeNodeFileERKN3osg4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_7OptionsE
SQL state: 58P01
I have the SFCGAL library installed with headers and debug symbols:
$ dpkg -l | grep sfcgal
ii libsfcgal-dev 1.2.2-1 amd64 Library for ISO 19107:2013 and OGC SFA 1.2 for 3D operations (dev part)
ii libsfcgal1 1.2.2-1 amd64 Library for ISO 19107:2013 and OGC SFA 1.2 for 3D operations (runtime part)
ii sfcgal-bin 1.2.2-1 amd64 Simple viewer for SFCGAL library
ii sfcgal-dbg 1.2.2-1 amd64 Debug symbols for SFCGAL
How can I overcome this?
Update
I was not able to find a package source for a more recent version of the SFCGAL library. Therefore I decided to re-install the software stack from a single repository, the UbuntuGIS PPA. Now I have the following set up:
postgresql-9.5
postgresql-9.5-postgis-2.2
(2.2.1+dfsg-3~xenial0)postgis
(2.2.1+dfsg-3~xenial0)libsfcgal1
(1.2.2-1)
But with this new setup I get the same error:
# CREATE EXTENSION postgis;
ERROR: could not load library "/usr/lib/postgresql/9.5/lib/postgis-2.2.so": /usr/lib/x86_64-linux-gnu/libSFCGAL.so.1: undefined symbol: _ZN5osgDB13writeNodeFileERKN3osg4NodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_7OptionsE