luukvdmeer / sfnetworks

Tidy Geospatial Networks in R
https://luukvdmeer.github.io/sfnetworks/
Other
347 stars 20 forks source link

Installation fails on Ubuntu 20.04 #136

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

Describe the bug

The installation fails and I'm not sure why. I wonder if it's related to this just-reported issue: https://github.com/r-spatial/sf/issues/1628

Reproducible example

install.packages("sfnetworks")
#> Installing package into '/home/robin/R/x86_64-pc-linux-gnu-library/4.0'
#> (as 'lib' is unspecified)
#> Warning in install.packages("sfnetworks"): installation of package 'sfnetworks'
#> had non-zero exit status
``` Installing package into ‘/home/robin/R/x86_64-pc-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cloud.r-project.org/src/contrib/sfnetworks_0.5.0.tar.gz' Content type 'application/x-gzip' length 2750161 bytes (2.6 MB) ================================================== downloaded 2.6 MB * installing *source* package ‘sfnetworks’ ... ** package ‘sfnetworks’ successfully unpacked and MD5 sums checked ** using staged installation ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading double free or corruption (out) Aborted (core dumped) ERROR: lazy loading failed for package ‘sfnetworks’ * removing ‘/home/robin/R/x86_64-pc-linux-gnu-library/4.0/sfnetworks’ * restoring previous ‘/home/robin/R/x86_64-pc-linux-gnu-library/4.0/sfnetworks’ Warning in install.packages : installation of package ‘sfnetworks’ had non-zero exit status The downloaded source packages are in ‘/tmp/RtmpMFi2bp/downloaded_packages’ ```

Created on 2021-03-14 by the reprex package (v1.0.0)

Expected behavior

Success!

R Session Info

library(sfnetworks)

Created on 2021-03-14 by the reprex package (v1.0.0)

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.4 (2021-02-15) #> os Ubuntu 20.04.2 LTS #> system x86_64, linux-gnu #> ui X11 #> language en_GB:en #> collate en_GB.UTF-8 #> ctype en_GB.UTF-8 #> tz Europe/London #> date 2021-03-14 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib source #> assertthat 0.2.1 2019-03-21 [3] CRAN (R 4.0.0) #> backports 1.2.1 2020-12-09 [1] CRAN (R 4.0.3) #> class 7.3-18 2021-01-24 [4] CRAN (R 4.0.3) #> classInt 0.4-3 2020-04-07 [1] CRAN (R 4.0.2) #> cli 2.3.1 2021-02-23 [1] CRAN (R 4.0.4) #> colorspace 2.0-0 2020-11-11 [3] CRAN (R 4.0.3) #> crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.3) #> DBI 1.1.1 2021-01-15 [1] CRAN (R 4.0.3) #> digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3) #> dplyr 1.0.5 2021-03-05 [3] CRAN (R 4.0.4) #> e1071 1.7-4 2020-10-14 [1] CRAN (R 4.0.3) #> ellipsis 0.3.1 2020-05-15 [3] CRAN (R 4.0.0) #> evaluate 0.14 2019-05-28 [3] CRAN (R 4.0.0) #> fansi 0.4.2 2021-01-15 [1] CRAN (R 4.0.3) #> fs 1.5.0 2020-07-31 [3] CRAN (R 4.0.2) #> generics 0.1.0 2020-10-31 [3] CRAN (R 4.0.3) #> ggplot2 3.3.3 2020-12-30 [3] CRAN (R 4.0.3) #> glue 1.4.2 2020-08-27 [3] CRAN (R 4.0.2) #> gtable 0.3.0 2019-03-25 [3] CRAN (R 4.0.0) #> highr 0.8 2019-03-20 [3] CRAN (R 4.0.0) #> htmltools 0.5.1.1 2021-01-22 [3] CRAN (R 4.0.3) #> igraph 1.2.6 2020-10-06 [3] CRAN (R 4.0.2) #> KernSmooth 2.23-18 2020-10-29 [4] CRAN (R 4.0.3) #> knitr 1.31 2021-01-27 [3] CRAN (R 4.0.3) #> lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.0.3) #> lwgeom 0.2-5 2020-06-12 [1] CRAN (R 4.0.3) #> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.3) #> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.3) #> pillar 1.5.1 2021-03-05 [1] CRAN (R 4.0.4) #> pkgconfig 2.0.3 2019-09-22 [3] CRAN (R 4.0.0) #> purrr 0.3.4 2020-04-17 [3] CRAN (R 4.0.0) #> R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.3) #> Rcpp 1.0.6 2021-01-15 [3] CRAN (R 4.0.3) #> reprex 1.0.0 2021-01-27 [3] CRAN (R 4.0.3) #> rlang 0.4.10 2020-12-30 [1] CRAN (R 4.0.3) #> rmarkdown 2.7 2021-02-19 [1] CRAN (R 4.0.4) #> scales 1.1.1 2020-05-11 [3] CRAN (R 4.0.0) #> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.3) #> sf 0.9-7 2021-01-06 [1] CRAN (R 4.0.4) #> sfheaders 0.4.0 2020-12-01 [1] CRAN (R 4.0.3) #> sfnetworks * 0.4.1 2021-02-15 [1] Github (luukvdmeer/sfnetworks@253b714) #> stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.2) #> stringr 1.4.0 2019-02-10 [3] CRAN (R 4.0.0) #> styler 1.3.2.9000 2020-11-08 [1] Github (pat-s/styler@51d5200) #> tibble 3.1.0 2021-02-25 [1] CRAN (R 4.0.4) #> tidygraph 1.2.0 2020-05-12 [1] CRAN (R 4.0.2) #> tidyr 1.1.3 2021-03-03 [3] CRAN (R 4.0.4) #> tidyselect 1.1.0 2020-05-11 [3] CRAN (R 4.0.0) #> units 0.7-0 2021-02-25 [1] CRAN (R 4.0.4) #> utf8 1.2.1 2021-03-12 [1] CRAN (R 4.0.4) #> vctrs 0.3.6.9000 2021-02-12 [1] Github (r-lib/vctrs@9af59e9) #> withr 2.4.1 2021-01-26 [1] CRAN (R 4.0.3) #> xfun 0.22 2021-03-11 [1] CRAN (R 4.0.4) #> yaml 2.2.1 2020-02-01 [3] CRAN (R 4.0.0) #> #> [1] /home/robin/R/x86_64-pc-linux-gnu-library/4.0 #> [2] /usr/local/lib/R/site-library #> [3] /usr/lib/R/site-library #> [4] /usr/lib/R/library ```
loreabad6 commented 3 years ago

Hi Robin, it could be related indeed. We also faced this with GH actions that started checking the package with 20.04 and started failing. The reason was that some internal packages from Ubuntu appeared to not be there? So we rolled back to 18.04 for the actions. Maybe the logs here give a hint to your problem?

Can you install from GitHub btw?

luukvdmeer commented 3 years ago

For me it works using Ubuntu 20.04.1 LTS. But I do have more up-to-date versions of the geospatial system dependencies: GEOS 3.9.0, GDAL 3.2.0, PROJ 7.2.0

Lookin at Edzers reply in the issue onf sf, updating those libraries (especially PROJ) might solve it? I installed them with the Ubuntugis PPA.

Robinlovelace commented 3 years ago

Fixed after updating the OSGeo libraries, as documented in https://github.com/r-spatial/sf/issues/1628. Worth recommending the ubuntugis-unstable PPA and linking to https://rtask.thinkr.fr/installation-of-r-4-0-on-ubuntu-20-04-lts-and-tips-for-spatial-packages/ in the README?

Fixed in any case :tada: