install most recent version of libgeos in ubuntu

First remove all previous installations of libgeos using:

sudo apt remove libgeos*

sudo updatedb

You can also search for other installation using

locate libgeos or locate geos

Remove any installation or spurious ln file.

Normally it will permit to remove this kind of message in R:

WARNING: different compile-time and run-time versions of GEOS
Compiled with:3.12.0-CAPI-1.18.0
 Running with:3.10.2-CAPI-1.16.0



(check the most recent version of the lib in the web site https://libgeos.org/usage/download/

If the 3.12.1 version is the most recent:

wget https://download.osgeo.org/geos/geos-3.12.1.tar.bz2

tar xvfj geos-3.12.1.tar.bz2

cd geos-3.12.1

mkdir _build

cd _build

# Set up the build

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local  ..

# Run the build, test, install

make

ctest

sudo make install

After you can remove the files:

cd ../..

rm -rf geos-3.12.1

rm -rf geos-3.12.1.tar.bz2 

Then add this in .profile

GEOS_LIBRARY_PATH='/usr/lib/x86_64-linux-gnu/lib/libgeos_c.so'


If you install libgdal-dev it will go back to an earlier version of libgeos


Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04