<div dir="ltr"><div><div><div><div><div><div><div><div>Sorry strk, it worked!  I was doing something wrong.<br><br></div>So resume for anyone interested:<br></div>I was trying to migrate from postgis 2.0 to 2.2<br></div>I successfully installed the postgis static library and had the migration script in place.<br></div>The soft upgrade works "ALTER EXTENSION 
postgis UPDATE TO '2.2.2';" works only if the db instance was spatially enabled by running the script "CREATE EXTENSION POSTGIS"<br></div>In case it wasn´t and as strk suggested, run the following steps:<br><br>CREATE EXTENSION POSTGIS VERSION '2.0.0' FROM 'unpackaged';<br></div>sudo -u postgres psql -d <yrdb> -f  rtpostgis.sql (in /usr/share/postgresql/9.1/contrib/postig-2.0/  on my instance)<br><br><br></div>Thank you very much for your support!<br></div>Paolo<div class="gmail_extra"><br><div class="gmail_quote">2016-11-09 20:27 GMT+01:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Nov 09, 2016 at 06:33:28PM +0100, Paolo Importuni wrote:<br>
> 2016-11-09 12:06 GMT+01:00 Sandro Santilli <<a href="mailto:strk@kbt.io">strk@kbt.io</a>>:<br>
> > On Wed, Nov 09, 2016 at 11:44:53AM +0100, Paolo Importuni wrote:<br>
> > ><br>
</span><span class="">> > > I've just tried but it complains that<br>
> > > "ERROR:  type "raster" does not exist"<br>
> ><br>
> > This is because postgis _EXTENSION_ is forced to have<br>
> > also raster in it :(<br>
> ><br>
> > So the fix is for you to load raster script for 2.0.0<br>
> ><br>
> > psql -f `pg_config --sharedir`/contrib/postgis-2.<wbr>0/rtpostgis.sql <yourdb><br>
><br>
</span><span class="">> still problems, it says:<br>
> "You need to install postgresql-server-dev-X.Y for building a server-side<br>
> extension or libpq-dev for building a client-side application"<br>
<br>
</span>Not the psql command I gave you above, right ?<br>
Did you try that ? Or what are you doing ?<br>
<span class=""><br>
> Do I need to apt-install postgresql-server-dev-X.Y? What's the use?<br>
<br>
</span>If you're building PostGIS yourself  you need postgresql server headers.<br>
<br>
--strk;<br>
</blockquote></div><br></div></div>