[R] Help reinstalling rgdal (Ubuntu 16.04)

MacQueen, Don m@cqueen1 @end|ng |rom ||n|@gov
Fri Aug 10 00:13:38 CEST 2018


There are quite a few messages on R-sig-geo about installing rgdal on Ubuntu. Maybe one of them contains your solution?
(I use Mac, so can't help directly)

-Don

--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 

On 8/9/18, 8:36 AM, "R-help on behalf of Alexandra Thorn" <r-help-bounces using r-project.org on behalf of mail using alexandrathorn.com> wrote:

    Hi all,
    
    Following some updates to R that I received via Synaptic Package
    Manager on Ubuntu 16.04 (looks like I now have R 3.4.4-1xenial0), I
    have been unable to reinstall rgdal, and I need help.
    
    Initially I was getting error messages about dependencies on GDAL
    1.11.4, but after following instructions to install GDAL from source
    (into my /usr/local directory) I'm now getting a different set of error
    messages (see the output error messages posted below my signature).  
    
    I can't tell if this means that I've made a mistake installing GDAL or
    if there's some other problem with my setup/configuration.  I really
    need rgdal for the analyses I do in R and could use some help figuring
    this out.
    
    Thanks,
    Alex
    
    > install.packages("rgdal")
    Installing package into ‘/home/athorn/R/x86_64-pc-linux-gnu-library/3.4’
    (as ‘lib’ is unspecified)
    trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.3-4.tar.gz'
    Content type 'application/x-gzip' length 1664774 bytes (1.6 MB)
    ==================================================
    downloaded 1.6 MB
    
    * installing *source* package ‘rgdal’ ...
    ** package ‘rgdal’ successfully unpacked and MD5 sums checked
    configure: R_HOME: /usr/lib/R
    configure: CC: gcc -std=gnu99
    configure: CXX: g++
    configure: C++11 support available
    configure: rgdal: 1.3-4
    checking for /usr/bin/svnversion... no
    configure: svn revision: 766
    checking for gdal-config... /usr/local/bin/gdal-config
    checking gdal-config usability... yes
    configure: GDAL: 2.3.1
    checking C++11 support for GDAL >= 2.3.0... yes
    checking GDAL version >= 1.11.4... yes
    checking gdal: linking with --libs only... no
    checking gdal: linking with --libs and --dep-libs... no
    In file included from /usr/local/include/gdal.h:45:0,
                     from gdal_test.cc:1:
    /usr/local/include/cpl_port.h:187:6: error: #error Must have C++11 or
      newer. #    error Must have C++11 or newer.
          ^
    In file included from /usr/local/include/gdal.h:49:0,
                     from gdal_test.cc:1:
    /usr/local/include/cpl_minixml.h:202:47: error: expected template-name
      before '<' token class CPLXMLTreeCloser: public
      std::unique_ptr<CPLXMLNode, CPLXMLTreeCloserDeleter> ^
    /usr/local/include/cpl_minixml.h:202:47: error: expected '{' before '<'
      token /usr/local/include/cpl_minixml.h:202:47: error: expected
      unqualified-id before '<' token In file included
      from /usr/local/include/ogr_api.h:45:0,
      from /usr/local/include/gdal.h:50, from gdal_test.cc:1:
    /usr/local/include/ogr_core.h:79:28: error: expected '}' before end of
      line /usr/local/include/ogr_core.h:79:28: error: expected declaration
      before end of line In file included
      from /usr/local/include/gdal.h:45:0, from gdal_test.cc:1:
    /usr/local/include/cpl_port.h:187:6: error: #error Must have C++11 or
      newer. #    error Must have C++11 or newer.
          ^
    In file included from /usr/local/include/gdal.h:49:0,
                     from gdal_test.cc:1:
    /usr/local/include/cpl_minixml.h:202:47: error: expected template-name
      before '<' token class CPLXMLTreeCloser: public
      std::unique_ptr<CPLXMLNode, CPLXMLTreeCloserDeleter> ^
    /usr/local/include/cpl_minixml.h:202:47: error: expected '{' before '<'
      token /usr/local/include/cpl_minixml.h:202:47: error: expected
      unqualified-id before '<' token In file included
      from /usr/local/include/ogr_api.h:45:0,
      from /usr/local/include/gdal.h:50, from gdal_test.cc:1:
    /usr/local/include/ogr_core.h:79:28: error: expected '}' before end of
      line /usr/local/include/ogr_core.h:79:28: error: expected declaration
      before end of line configure: Install failure: compilation and/or
      linkage problems. configure: error: GDALAllRegister not found in
      libgdal. ERROR: configuration failed for package ‘rgdal’
    * removing ‘/home/athorn/R/x86_64-pc-linux-gnu-library/3.4/rgdal’
    
    The downloaded source packages are in
    	‘/tmp/RtmpeuSDnj/downloaded_packages’
    Warning message:
    In install.packages("rgdal") :
      installation of package ‘rgdal’ had non-zero exit status
    > 
    
    ______________________________________________
    R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.
    



More information about the R-help mailing list