Skip to content
Prev 26638 / 29559 Next

CRAN releases of sp, rgdal and rgeos

Hi Roger,

I have now managed to reinstall GDAL 2.3 and the latest versions of 
rgdal and sf. These are the steps I have followed:

1. First remove existing installation of GDAL using:

sudo apt-get purge --auto-remove gdal-bin

*this also removes QGIS / anything linked with GDAL.

2. Download GDAL source code 
(https://trac.osgeo.org/gdal/wiki/DownloadSource) and follow the 
instructions to install from source 
(https://trac.osgeo.org/gdal/wiki/BuildingOnUnix)

3. Installation from source code takes quite some time (10-15 minutes). 
After that I get:

gdalinfo --version
GDAL 2.3.0, released 2018/05/04

4. Install rgdal from R-forge using e.g.:

R CMD INSTALL rgdal_1.3-3.tar.gz
* installing to library ?/opt/microsoft/ropen/3.4.3/lib64/R/library?
* installing *source* package ?rgdal? ...
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgdal: 1.3-3
checking for /usr/bin/svnversion... yes
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision:
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
configure: C++11 support available
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.3.0
checking C++11 support for GDAL >= 2.3.0... yes
checking GDAL version >= 1.11.4... yes
checking gdal: linking with --libs only... yes
checking GDAL: /usr/local/share/gdal/pcs.csv readable... yes
configure: pkg-config proj exists, will use it
configure: PROJ version: 4.9.2
checking proj_api.h presence and usability... yes
checking PROJ version >= 4.8.0... yes
checking projects.h presence and usability... yes
checking PROJ.4: epsg found and readable... yes
checking PROJ.4: conus found and readable... yes
configure: Package CPP flags:  -I/usr/local/include
configure: Package LIBS:  -L/usr/local/lib -lgdal -lproj
configure: creating ./config.status

For sf I had to manually update DBI and units packages as it requires 
newest versions.

So now everything works fine. Thank you!

Tom
On 06/19/2018 10:41 AM, Roger Bivand wrote: