After all @janechii clues.... and purging all possible residuals,
sudo apt-get purge build-essential libgeos-3.4 libgeos-c1 libgeos-dev libxml2-dev libgdal-dev libproj-dev libjson0-dev xsltproc docbook-xsl docbook-mathml
sudo apt-get purge postgis
I statart with (adapting!) recipes of this link:
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
tar xfj geos-3.4.2.tar.bz2
cd geos-3.4.2
./configure
make
sudo make install
cd ..
At here ok geos 3.4 there (!). Then...
wget http://download.osgeo.org/postgis/source/postgis-2.1.3.tar.gz
tar xfz postgis-2.1.3.tar.gz
cd postgis-2.1.3
./configure
sudo make install
this last make trigg a "configure: error: the PGXS Makefile (...) cannot be found. Please install the PostgreSQL server development packages and re-run configure". So, as some more clues here do
sudo apt-get install postgresql-server-dev-9.3
so red config,
./configure
then ok, a good msg:
PostGIS is now configured for x86_64-unknown-linux-gnu
-------------- Compiler Info -------------
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
SQL preprocessor: /usr/bin/cpp -w -traditional-cpp -P
-------------- Dependencies --------------
GEOS config: /usr/local/bin/geos-config
GEOS version: 3.4.2
...
--------------- Extensions ---------------
PostGIS Raster: enabled
PostGIS Topology: enabled
SFCGAL support: disabled
-------- Documentation Generation --------
xsltproc: /usr/bin/xsltproc
....
Then, continue:
make
# PostGIS was built successfully. Ready to install.
sudo make install
sudo ldconfig
sudo make comments-install
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/shp2pgsql
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql
psql -h localhost -U postgres postgres
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
\q
Then, testing with this script... OK!!!!
SELECT postgis_full_version();and update your question with the output. Your operating system would also be helpful when talking about upgrades. The links you provided seem to be good solutions. Let us know if they work! – janechii Oct 06 '14 at 23:48apt-get remove purge libgeos-3.3? How check if there are two GEOS's? ... Or as suggested by JohnBarça, I need have to resort to building from source... No rationale option? – Peter Krauss Oct 07 '14 at 00:42