Skip to content

rgdal, sf and lwgeom build instructions for CentOS 7 fails. #76

@andrie

Description

@andrie

I'm trying to install the packages rgdal, sf and lwgeom on CentOS-7 to replicate a customer request.

The instructions on Public RSPM says to use:

rpm -q epel-release || yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y gdal-devel
yum install -y gdal
yum install -y proj-devel
yum install -y proj-epsg

But this fails for me, with versions of gdal and geos that are out of date.

To reproduce, I tried these instructions in a Dockerfile:

FROM rstudio/r-base:3.6.0-centos7
# Install sf dependencies
RUN rpm -q epel-release || yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum install -y \
        epel-release \
        udunits2-devel \
        gdal-devel \
        geos-devel \
        proj-devel \
        proj-epsg
RUN Rscript -e 'install.packages(c("Rcpp"), repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/centos7/latest"))'
RUN Rscript -e 'install.packages(c("rgdal"), repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/centos7/latest"))'
RUN Rscript -e 'install.packages(c("sf"), repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/centos7/latest"))'
RUN Rscript -e 'install.packages(c("lwgeom"), repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/centos7/latest"))'

But this fails with an error:

checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 1.11.4
checking GDAL version >= 2.0.1... no

And similarly for geos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions