Library version mis-match

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

Library version mis-match

Rich Shepard
   If the r-help list is better suited for this question let me know and I'll
move the thread there.

   Installed here are gdal-2.2.4 and geos-3.7.0

   When I check installed libraries with library() both rgdal and rgeos are
shown as being available:

rgdal                   Bindings for the 'Geospatial' Data Abstraction
                         Library
rgeos                   Interface to Geometry Engine - Open Source
                         ('GEOS')

   However, when I try to use them in an operation with the sp() package the
attempts fail. So I tried re-installing them. rgeos had no problem
re-installing, but rgdal is not happy:

** testing if installed package can be loaded
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
  unable to load shared object '/usr/lib/R/library/rgdal/libs/rgdal.so':
   libgeos-3.6.3.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/lib/R/library/rgdal’
* restoring previous ‘/usr/lib/R/library/rgdal’

The downloaded source packages are in
  ‘/tmp/Rtmp22EDOj/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("rgdal") :
   installation of package ‘rgdal’ had non-zero exit status

   How can I resolve this by having R recognize, and use, geos-3.7.0? Or, do
I need to downgrade geos to the earlier 3.6.3?

Rich

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Library version mis-match

Roger Bivand
Administrator
On Thu, 20 Sep 2018, Rich Shepard wrote:

>  If the r-help list is better suited for this question let me know and I'll
> move the thread there.

No, this is the right list, but always include the output of
sessionInfo(), and the startup messages shown by rgdal and rgeos when they
are attached.

>
>  Installed here are gdal-2.2.4 and geos-3.7.0
>

How many other versions of gdal and/or geos do you have? It looks as
though libgdal was built against libgeos-3.6.3, but you upgraded libgeos
later, removing that version. Easiest is having one version only, and
building everything in lockstep (PROJ and GEOS, then GDAL, then rgdal
and/or GRASS) and having only one version of each. Both rgdal and rgeos
may suffer from being installed with the versions shown by gdal-config and
geos-config, but finding different versions in the dynamic library load
path. I'm assuming you are neither on Windows nor MacOS - all this is
sorted out on CRAN in binary rgdal and rgeos (and sf) packages for those
platforms.

Hope this helps,

Roger

>  When I check installed libraries with library() both rgdal and rgeos are
> shown as being available:
>
> rgdal                   Bindings for the 'Geospatial' Data Abstraction
>                        Library
> rgeos                   Interface to Geometry Engine - Open Source
>                         ('GEOS')
>
>  However, when I try to use them in an operation with the sp() package the
> attempts fail. So I tried re-installing them. rgeos had no problem
> re-installing, but rgdal is not happy:
>
> ** testing if installed package can be loaded
> Error: package or namespace load failed for ?rgdal? in dyn.load(file, DLLpath
> = DLLpath, ...):
>  unable to load shared object '/usr/lib/R/library/rgdal/libs/rgdal.so':
>  libgeos-3.6.3.so: cannot open shared object file: No such file or directory
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing ?/usr/lib/R/library/rgdal?
> * restoring previous ?/usr/lib/R/library/rgdal?
>
> The downloaded source packages are in
> ?/tmp/Rtmp22EDOj/downloaded_packages?
> Updating HTML index of packages in '.Library'
> Making 'packages.html' ... done
> Warning message:
> In install.packages("rgdal") :
>   installation of package ?rgdal? had non-zero exit status
>
>  How can I resolve this by having R recognize, and use, geos-3.7.0? Or, do
> I need to downgrade geos to the earlier 3.6.3?
>
> Rich
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>

--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: Library version mis-match

Rich Shepard
On Thu, 20 Sep 2018, Roger Bivand wrote:

> No, this is the right list, but always include the output of sessionInfo(),
> and the startup messages shown by rgdal and rgeos when they are attached.

Roger,

   I'll include more information the next time I have an issue.

> How many other versions of gdal and/or geos do you have? It looks as though
> libgdal was built against libgeos-3.6.3, but you upgraded libgeos later,

   This might well be the issue. geos was upgraded from the summer's 3.6.3 to
the very recent 3.7.0 and when I run weekly upgrades to installed
Slackbuilds.org packages that was upgraded. I'll rebuild gdal and check that
the issue is resolved.

   Not long ago I did rebuild the sequence proj -> geos -> gdal -> grass and
the R upgrade might have missed that.

Many thanks,

Rich

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Library version mis-match [FIXED]

Rich Shepard
On Thu, 20 Sep 2018, Rich Shepard wrote:

> This might well be the issue. geos was upgraded from the summer's 3.6.3 to
> the very recent 3.7.0 and when I run weekly upgrades to installed
> Slackbuilds.org packages that was upgraded. I'll rebuild gdal and check that
> the issue is resolved.

   Fixed. Rebuilt/re-installed gdal-2.4.4 and rgdal re-installed without
problems.

Thanks again,

Rich

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo