Error when deploying R Shiny app : Error building rgeos (0.4-1)

I have a brilliant web application deployed on shinyapps.io that has worked well so far. After a minor update of the code, when I try to publish, I now get an error.

Here is the detailed deployment log:

> Preparing to deploy application...DONE
Uploading bundle for application: 504547...DONE
Deploying bundle: 1678029 for application: 504547 ...
Waiting for task: 562088815
  building: Parsing manifest
  building: Building image: 1725789
  building: Installing system dependencies
  building: Fetching packages
  building: Building package: rgeos
###################### Begin Task Log ##########################
[2018-11-02T10:09:14.261132093+0000] Execute script: packages/build/rgeos.sh
>+ set -e
>+ apt-get update -qq
>+ apt-get install -y libgeos-dev
Reading package lists...
Building dependency tree...
Reading state information...
libgeos-dev is already the newest version (3.5.0-1ubuntu2).
libgeos-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 51 not upgraded.
...
configure: GEOS version: 3.5.0
checking geos version at least 3.2.0... yes
checking geos-config clibs... yes
checking geos_c.h  presence and usability... yes
checking geos: linking with libgeos_c... no
/usr/bin/ld: cannot find -lgeos
collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: initGEOS_r not found in libgeos_c.
ERROR: configuration failed for package ‘rgeos’
> removing ‘/opt/R/3.5.1/lib/R/library/rgeos’
######################### End Task Log ###########################
Error: Unhandled Exception: Child Task 562088818 failed: Error building image: Error building rgeos (0.4-1). Build exited with non-zero status: 1
Execution halted

Here is the app dependancies

> package version source
1 BH 1.66.0-1 CRAN
2 DBI 1.0.0 CRAN
3 MASS 7.3-51 CRAN
4 Matrix 1.2-14 CRAN
5 R6 2.3.0 CRAN
6 RColorBrewer 1.1-2 CRAN
7 Rcpp 0.12.19 CRAN
8 assertthat 0.2.0 CRAN
9 backports 1.1.2 CRAN
10 base64enc 0.1-3 CRAN
11 bindr 0.1.1 CRAN
12 bindrcpp 0.2.2 CRAN
13 broom 0.5.0 CRAN
14 callr 3.0.0 CRAN
15 cellranger 1.1.0 CRAN
16 cli 1.0.1 CRAN
17 clipr 0.4.1 CRAN
18 colorspace 1.3-2 CRAN
19 crayon 1.3.4 CRAN
20 curl 3.2 CRAN
21 data.table 1.11.8 CRAN
22 dbplyr 1.2.2 CRAN
23 digest 0.6.18 CRAN
24 dotCall64 1.0-0 CRAN
25 dplyr 0.7.7 CRAN
26 evaluate 0.12 CRAN
27 fansi 0.4.0 CRAN
28 fields 9.6 CRAN
29 forcats 0.3.0 CRAN
30 foreign 0.8-71 CRAN
31 fs 1.2.6 CRAN
32 ggplot2 3.1.0 CRAN
33 glue 1.3.0 CRAN
34 gridExtra 2.3 CRAN
35 gtable 0.2.0 CRAN
36 haven 1.1.2 CRAN
37 highr 0.7 CRAN
38 hms 0.4.2 CRAN
39 htmltools 0.3.6 CRAN
40 httpuv 1.4.5 CRAN
41 httr 1.3.1 CRAN
42 jsonlite 1.5 CRAN
43 knitr 1.20 CRAN
44 labeling 0.3 CRAN
45 later 0.7.5 CRAN
46 lattice 0.20-35 CRAN
47 lazyeval 0.2.1 CRAN
48 lubridate 1.7.4 CRAN
49 magrittr 1.5 CRAN
50 maps 3.3.0 CRAN
51 maptools 0.9-4 CRAN
52 markdown 0.8 CRAN
53 mgcv 1.8-25 CRAN
54 mime 0.6 CRAN
55 modelr 0.1.2 CRAN
56 munsell 0.5.0 CRAN
57 nlme 3.1-137 CRAN
58 officer 0.3.2 CRAN
59 openssl 1.0.2 CRAN
60 packrat 0.4.9-3 CRAN
61 pillar 1.3.0 CRAN
62 pkgconfig 2.0.2 CRAN
63 plogr 0.2.0 CRAN
64 plyr 1.8.4 CRAN
65 png 0.1-7 CRAN
66 processx 3.2.0 CRAN
67 promises 1.0.1 CRAN
68 ps 1.2.0 CRAN
69 purrr 0.2.5 CRAN
70 readr 1.1.1 CRAN
71 readxl 1.1.0 CRAN
72 rematch 1.0.1 CRAN
73 reprex 0.2.1 CRAN
74 reshape 0.8.8 CRAN
75 reshape2 1.4.3 CRAN
76 rgeos 0.4-1 CRAN
77 rlang 0.3.0.1 CRAN
78 rmarkdown 1.10 CRAN
79 rprojroot 1.3-2 CRAN
80 rstudioapi 0.8 CRAN
81 rvest 0.3.2 CRAN
82 rworldmap 1.3-6 CRAN
83 rworldxtra 1.01 CRAN
84 scales 1.0.0 CRAN
85 selectr 0.4-1 CRAN
86 shiny 1.1.0 CRAN
87 shinymaterial 0.5.3 CRAN
88 shinythemes 1.1.1 CRAN
89 sourcetools 0.1.7 CRAN
90 sp 1.3-1 CRAN
91 spam 2.2-0 CRAN
92 stringi 1.2.4 CRAN
93 stringr 1.3.1 CRAN
94 tibble 1.4.2 CRAN
95 tidyr 0.8.2 CRAN
96 tidyselect 0.2.5 CRAN
97 tidyverse 1.2.1 CRAN
98 tinytex 0.9 CRAN
99 utf8 1.1.4 CRAN
100 uuid 0.1-2 CRAN
101 viridisLite 0.3.0 CRAN
102 whisker 0.3-2 CRAN
103 withr 2.1.2 CRAN
104 xfun 0.4 CRAN
105 xml2 1.2.0 CRAN
106 xtable 1.8-3 CRAN
107 yaml 2.2.0 CRAN
108 zip 1.0.0 CRAN

Here is my session info

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] rworldxtra_1.01     rworldmap_1.3-6     sp_1.3-1            rgeos_0.4-1         forcats_0.3.0      
 [6] stringr_1.3.1       dplyr_0.7.7         purrr_0.2.5         readr_1.1.1         tidyr_0.8.2        
[11] tibble_1.4.2        ggplot2_3.1.0       tidyverse_1.2.1     plyr_1.8.4          gridExtra_2.3      
[16] gtable_0.2.0        reshape_0.8.8       shinymaterial_0.5.3 shinythemes_1.1.1   shiny_1.1.0        

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.19     lubridate_1.7.4  lattice_0.20-35  assertthat_0.2.0 digest_0.6.18    mime_0.6        
 [7] R6_2.3.0         cellranger_1.1.0 backports_1.1.2  spam_2.2-0       httr_1.3.1       pillar_1.3.0    
[13] rlang_0.3.0.1    lazyeval_0.2.1   readxl_1.1.0     rstudioapi_0.8   foreign_0.8-71   RCurl_1.95-4.11 
[19] munsell_0.5.0    broom_0.5.0      compiler_3.5.1   httpuv_1.4.5     modelr_0.1.2     pkgconfig_2.0.2 
[25] htmltools_0.3.6  tidyselect_0.2.5 crayon_1.3.4     withr_2.1.2      later_0.7.5      bitops_1.0-6    
[31] grid_3.5.1       nlme_3.1-137     jsonlite_1.5     xtable_1.8-3     magrittr_1.5     scales_1.0.0    
[37] cli_1.0.1        stringi_1.2.4    promises_1.0.1   bindrcpp_0.2.2   xml2_1.2.0       RJSONIO_1.3-0   
[43] tools_3.5.1      glue_1.3.0       maps_3.3.0       hms_0.4.2        fields_9.6       rsconnect_0.8.8 
[49] yaml_2.2.0       colorspace_1.3-2 maptools_0.9-4   rvest_0.3.2      dotCall64_1.0-0  bindr_0.1.1     
[55] haven_1.1.2

Charles

Does the workaround in this topic (downgrading to an earlier rgeos version) help?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.