Problem installing rgdal.

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem installing rgdal.

Rolf Turner

I have recently acquired a new laptop and a new OS (Ubuntu 16.04) and
have encountered a problem when trying to install rgdal.

The initial hiccups were overcome by installing "libgdal-dev" and
"libproj-dev" on my system, and then re-installing the package "sp" (as
advised by postings that I googled up on StackOverflow.

But then I came to a shuddering halt when I got the following error
response to run install.packages("rgdal",lib="/home/rolf/Rlib")

Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object '/home/rolf/Rlib/rgdal/libs/rgdal.so':
   /home/rolf/Rlib/rgdal/libs/rgdal.so: undefined symbol:
CPLQuietErrorHandler

I've googled around a bit on that and could find nothing that I could
comprehend.

Can anyone point me in the right direction?  Ta.

cheers,

Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

J C Nash
I found that I have libgdal1-dev installed too.

john@john-J6-2015 ~ $ dpkg -l | grep gdal
ii  libgdal-dev                                 1.10.1+dfsg-5ubuntu1                                amd64
Geospatial Data Abstraction Library - Development files
ii  libgdal1-dev                                1.10.1+dfsg-5ubuntu1                                all
Geospatial Data Abstraction Library - Transitional package
ii  libgdal1h                                   1.10.1+dfsg-5ubuntu1                                amd64
Geospatial Data Abstraction Library
john@john-J6-2015 ~ $

and I get the following outputs in R:

> library(rgdal)
Loading required package: sp
rgdal: version: 1.1-10, (SVN revision 622)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
 Path to GDAL shared files: /usr/share/gdal/1.10
 Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
 Path to PROJ.4 shared files: (autodetected)
 Linking to sp version: 1.2-3
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rgdal_1.1-10 sp_1.2-3

loaded via a namespace (and not attached):
[1] grid_3.3.1      lattice_0.20-33
>

Hope this is helpful.

JN

On 16-10-04 02:19 AM, Rolf Turner wrote:

>
> I have recently acquired a new laptop and a new OS (Ubuntu 16.04) and have encountered a problem when trying to install
> rgdal.
>
> The initial hiccups were overcome by installing "libgdal-dev" and "libproj-dev" on my system, and then re-installing the
> package "sp" (as advised by postings that I googled up on StackOverflow.
>
> But then I came to a shuddering halt when I got the following error response to run
> install.packages("rgdal",lib="/home/rolf/Rlib")
>
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>   unable to load shared object '/home/rolf/Rlib/rgdal/libs/rgdal.so':
>   /home/rolf/Rlib/rgdal/libs/rgdal.so: undefined symbol: CPLQuietErrorHandler
>
> I've googled around a bit on that and could find nothing that I could comprehend.
>
> Can anyone point me in the right direction?  Ta.
>
> cheers,
>
> Rolf Turner

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

Rolf Turner
On 05/10/16 01:10, ProfJCNash wrote:

> I found that I have libgdal1-dev installed too.
>
> john@john-J6-2015 ~ $ dpkg -l | grep gdal
> ii  libgdal-dev                                 1.10.1+dfsg-5ubuntu1                                amd64
> Geospatial Data Abstraction Library - Development files
> ii  libgdal1-dev                                1.10.1+dfsg-5ubuntu1                                all
> Geospatial Data Abstraction Library - Transitional package
> ii  libgdal1h                                   1.10.1+dfsg-5ubuntu1                                amd64
> Geospatial Data Abstraction Library
> john@john-J6-2015 ~ $
>
> and I get the following outputs in R:
>
>> library(rgdal)
> Loading required package: sp
> rgdal: version: 1.1-10, (SVN revision 622)
>  Geospatial Data Abstraction Library extensions to R successfully loaded
>  Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
>  Path to GDAL shared files: /usr/share/gdal/1.10
>  Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
>  Path to PROJ.4 shared files: (autodetected)
>  Linking to sp version: 1.2-3
>> sessionInfo()
> R version 3.3.1 (2016-06-21)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 14.04.4 LTS
>
> locale:
>  [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
>  [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8
>  [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] rgdal_1.1-10 sp_1.2-3
>
> loaded via a namespace (and not attached):
> [1] grid_3.3.1      lattice_0.20-33
>>
>
> Hope this is helpful.


Afraid not.  I did not have libgdal1-dev installed, but having installed
it I tried install.packages("rgdal",lib="/home/rolf/Rlib")
again and got the same damned error message as before.

> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>   unable to load shared object '/home/rolf/Rlib/rgdal/libs/rgdal.so':
>   /home/rolf/Rlib/rgdal/libs/rgdal.so: undefined symbol: CPLQuietErrorHandler
> Error: loading failed
> Execution halted

Has anyone out there any other ideas as to what's going wrong for me and
how I might fix it?

cheers,

Rolf

--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

J C Nash
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.

Best, JN

On 16-10-04 05:07 PM, Rolf Turner wrote:

> On 05/10/16 01:10, ProfJCNash wrote:
>> I found that I have libgdal1-dev installed too.
>>
>> john@john-J6-2015 ~ $ dpkg -l | grep gdal
>> ii  libgdal-dev                                 1.10.1+dfsg-5ubuntu1                                amd64
>> Geospatial Data Abstraction Library - Development files
>> ii  libgdal1-dev                                1.10.1+dfsg-5ubuntu1                                all
>> Geospatial Data Abstraction Library - Transitional package
>> ii  libgdal1h                                   1.10.1+dfsg-5ubuntu1                                amd64
>> Geospatial Data Abstraction Library
>> john@john-J6-2015 ~ $
>>
>> and I get the following outputs in R:
>>
>>> library(rgdal)
>> Loading required package: sp
>> rgdal: version: 1.1-10, (SVN revision 622)
>>  Geospatial Data Abstraction Library extensions to R successfully loaded
>>  Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
>>  Path to GDAL shared files: /usr/share/gdal/1.10
>>  Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
>>  Path to PROJ.4 shared files: (autodetected)
>>  Linking to sp version: 1.2-3
>>> sessionInfo()
>> R version 3.3.1 (2016-06-21)
>> Platform: x86_64-pc-linux-gnu (64-bit)
>> Running under: Ubuntu 14.04.4 LTS
>>
>> locale:
>>  [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
>>  [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
>>  [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8
>>  [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C
>>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] rgdal_1.1-10 sp_1.2-3
>>
>> loaded via a namespace (and not attached):
>> [1] grid_3.3.1      lattice_0.20-33
>>>
>>
>> Hope this is helpful.
>
>
> Afraid not.  I did not have libgdal1-dev installed, but having installed it I tried
> install.packages("rgdal",lib="/home/rolf/Rlib")
> again and got the same damned error message as before.
>
>> ** testing if installed package can be loaded
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>   unable to load shared object '/home/rolf/Rlib/rgdal/libs/rgdal.so':
>>   /home/rolf/Rlib/rgdal/libs/rgdal.so: undefined symbol: CPLQuietErrorHandler
>> Error: loading failed
>> Execution halted
>
> Has anyone out there any other ideas as to what's going wrong for me and how I might fix it?
>
> cheers,
>
> Rolf
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

Rolf Turner
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?

cheers,

Rolf

--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

Bob Rudis
​Hey Ron,

I (literally, in the correct use of the term) fired up an Ubuntu 16.04
vagrant box - https://atlas.hashicorp.com/bento/boxes/ubuntu-16.04 - and
then did:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

and, then:

sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee
-a /etc/apt/sources.list
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get install r-base r-base-dev
sudo apt-get install libgdal-dev
sudo apt-get install libproj4-dev

and then did

install.packages("rgdal")

in an R session and it's working fine:

> library(rgdal)
Loading required package: sp
rgdal: version: 1.1-10, (SVN revision 622)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.11.3, released 2015/09/16
 Path to GDAL shared files: /usr/share/gdal/1.11
 Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
 Path to PROJ.4 shared files: (autodetected)
 Linking to sp version: 1.2-3

I wish I could have run into errors and helped debug your issue, but it
went in flawlessly.

-Bob



On Tue, Oct 4, 2016 at 8:31 PM, Rolf Turner <[hidden email]> wrote:

> 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?
>
> cheers,
>
> Rolf
>
> --
> Technical Editor ANZJS
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
>
> ______________________________________________
> [hidden email] 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/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

Jeff Newmiller
And if that was not intuitively obvious, googling "CRAN Ubuntu" would lead you to [1]. There is also R-sig-debian for these kinds of OS-specific questions next time. (I wish there was an R-sig-windows, but I suppose no one would support it.)

[1] https://cran.r-project.org/bin/linux/ubuntu/
--
Sent from my phone. Please excuse my brevity.

On October 4, 2016 6:12:31 PM PDT, Bob Rudis <[hidden email]> wrote:

>​Hey Ron,
>
>I (literally, in the correct use of the term) fired up an Ubuntu 16.04
>vagrant box - https://atlas.hashicorp.com/bento/boxes/ubuntu-16.04 -
>and
>then did:
>
>lsb_release -a
>No LSB modules are available.
>Distributor ID: Ubuntu
>Description: Ubuntu 16.04.1 LTS
>Release: 16.04
>Codename: xenial
>
>and, then:
>
>sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo
>tee
>-a /etc/apt/sources.list
>gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
>gpg -a --export E084DAB9 | sudo apt-key add -
>sudo apt-get update
>sudo apt-get install r-base r-base-dev
>sudo apt-get install libgdal-dev
>sudo apt-get install libproj4-dev
>
>and then did
>
>install.packages("rgdal")
>
>in an R session and it's working fine:
>
>> library(rgdal)
>Loading required package: sp
>rgdal: version: 1.1-10, (SVN revision 622)
>Geospatial Data Abstraction Library extensions to R successfully loaded
> Loaded GDAL runtime: GDAL 1.11.3, released 2015/09/16
> Path to GDAL shared files: /usr/share/gdal/1.11
>Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
> Path to PROJ.4 shared files: (autodetected)
> Linking to sp version: 1.2-3
>
>I wish I could have run into errors and helped debug your issue, but it
>went in flawlessly.
>
>-Bob
>​
>
>
>On Tue, Oct 4, 2016 at 8:31 PM, Rolf Turner <[hidden email]>
>wrote:
>
>> 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?
>>
>> cheers,
>>
>> Rolf
>>
>> --
>> Technical Editor ANZJS
>> Department of Statistics
>> University of Auckland
>> Phone: +64-9-373-7599 ext. 88276
>>
>> ______________________________________________
>> [hidden email] 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/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

Rainer Krug-3
In reply to this post by Rolf Turner
Rolf Turner <[hidden email]> 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,

Rainer

>
> cheers,
>
> Rolf

--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

______________________________________________
[hidden email] 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.

signature.asc (463 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

Rolf Turner
On 05/10/16 20:47, Rainer M Krug wrote:

> Rolf Turner <[hidden email]> 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.

cheers,

Rolf

--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing rgdal.

Michael Sumner-2
>From source I always consult Edzer's Travis configurations such as:
https://github.com/edzer/spacetime/blob/master/.travis.yml
<https://github.com/edzer/gstat/blob/master/.travis.yml>

For really bleeding edge and all the other hard install libs on Docker  I
just go straight to the rockerverse:
https://hub.docker.com/r/rocker/hadleyverse/

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
them.)

## manual set config and key for apt-get update, see
http://cran.r-project.org/bin/linux/ubuntu/README
# echo 'deb https://cloud.r-project.org/bin/linux/ubuntu xenial/' >>
/etc/apt/sources.list
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

## manually set updated GDAL
## https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable
# add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes

apt-get update
apt-get upgrade

## Install 3rd parties ymmv

## HDF4
apt-get install libhdf4-dev
apt-get install hdf4-tools

## NetCDF
apt-get install libnetcdf-dev
apt-get install netcdf-bin

## GEOS
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"))'

Cheers, Mike.

On Wed, 5 Oct 2016 at 19:41 Rolf Turner <[hidden email]> wrote:

> On 05/10/16 20:47, Rainer M Krug wrote:
> > Rolf Turner <[hidden email]> 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.
>
> cheers,
>
> Rolf
>
> --
> Technical Editor ANZJS
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276 <+64%209-373%207599>
>
> ______________________________________________
> [hidden email] 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.
>
--
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.