[R] Problem installing rgdal.
mdsumner at gmail.com
Wed Oct 5 11:09:38 CEST 2016
>From source I always consult Edzer's Travis configurations such as:
For really bleeding edge and all the other hard install libs on Docker I
just go straight to the rockerverse:
For package installs, this is more or less what I do from scratch on Ubuntu
16.04, I *always* go for the updated packages to ensure GDAL is reasonably
up to date (current GDAL is 2.1.1 and PROJ.4 is 4.9.2).
(Everything else advice-wise seems to be forever out of date. )
(I include PROJ.4, GEOS, HDF4, NetCDF4 and their tools since I always need
## manual set config and key for apt-get update, see
# echo 'deb https://cloud.r-project.org/bin/linux/ubuntu xenial/' >>
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
## manually set updated GDAL
# add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
## Install 3rd parties ymmv
apt-get install libhdf4-dev
apt-get install hdf4-tools
apt-get install libnetcdf-dev
apt-get install netcdf-bin
apt-get install libgeos-dev
## PROJ.4 and GDAL
apt-get install proj-bin
apt-get install libproj-dev
apt-get install libgdal-dev
apt-get install gdal-bin
## now R
apt-get install r-base r-base-dev
Rscript -e 'install.packages(c("rgdal"))'
On Wed, 5 Oct 2016 at 19:41 Rolf Turner <r.turner at auckland.ac.nz> wrote:
> On 05/10/16 20:47, Rainer M Krug wrote:
> > Rolf Turner <r.turner at auckland.ac.nz> writes:
> >> On 05/10/16 12:56, ProfJCNash wrote:
> >>> Can you build/install the source package? I had a problem once where
> my libraries were "too recent" for the R package,
> >>> but I could build against my installed base. In any event, it may
> point out the source of the problem.
> >>> I can appreciate your frustration -- been there, but wish I hadn't.
> >> Essentially install.packages() builds from source.
> >> I also tried to install from the source tarball; same error resulted.
> >> Surely there *must* be somebody out there who understands what's going
> >> on and how to fix it. Mustn't there?
> > I didn't follow the thread closely, but these types of errors can mean
> > version conflicts, i.e. that you have either two versions of gdal
> > installed and the installer picks up the wrong version or a mix of
> > versions or that you have the wrong version installed.
> > Check you gdal installations (from source, package manager, whatever
> > there is), uninstall gdal completely and search thoroughly if there are
> > any leftovers (apt-get purge ...). Then I would logout and login again -
> > just to be sure that all caches are up to date (although I doubt this
> > is necessary).
> > Than I would check if there are any stray installations or rgdal sitting
> > in any library.
> > Than I would install all ubuntu packages neeed for gdal (from the CRAN
> > for rgdal: "for building from source: GDAL >= 1.6.3, library from
> http://trac.osgeo.org/gdal/wiki/DownloadSource and PROJ.4 (proj >= 4.4.9)
> from http://download.osgeo.org/proj/"), make sure that
> > they are working from the commandline, and that try again installing the
> > version of rgdal.
> > And if not, there is r-sig-spatial which is a much better place to ask
> > rgdal related questions than r-help.
> > Hope this helps.
> Thanks. That seems to be good advice. I'll try it.
> Technical Editor ANZJS
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276 <+64%209-373%207599>
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia
[[alternative HTML version deleted]]
More information about the R-help