"unable to find rgdal" on server

225 views
Skip to first unread message

Alexandre Dangléant

unread,
Jun 9, 2017, 9:53:53 AM6/9/17
to shinyapps.io Users
Hi all,

I get an error in my app which suggest that "rgdal" were not installed on the server when deploying.

2017-06-09T10:15:09.766105+00:00 shinyapps[103285]: Le chargement a nécessité le package : rgdal
2017-06-09T10:15:09.774888+00:00 shinyapps[103285]: Le chargement a nécessité le package : sp
2017-06-09T10:15:09.766516+00:00 shinyapps[103285]: Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
2017-06-09T10:15:09.766518+00:00 shinyapps[103285]:   aucun package nommé ‘rgdal’ n'est trouvé
2017-06-09T10:15:09.766749+00:00 shinyapps[103285]: Le chargement a nécessité le package : rjson
2017-06-09T10:15:09.771856+00:00 shinyapps[103285]: Le chargement a nécessité le package : geosphere

Of course, I've checked my code, packages are correctly specified for installation (and then required), including "rgdal" (there is about 10 pkg...).

My app works well on my laptop and, on the server, everything is fine except when trying to use an input in link with "read.OGR" function. It logicaly brings :

2017-06-09T10:17:32.432158+00:00 shinyapps[103285]: Warning: Error in areaPolygon: unable to find function "readOGR"

Some details :
I've got no error during deployment about package installation. I don't know if a log of the deployment exist and how to consult it.
I've not encountered this error with precedents versions of my app, which already include "rgdal".
As I use Ubuntu, I know that "rgdal" needs some stuff from apt-get (I can't remember which ones but it can be easily found).

So, everythings looks like a .deb package is missing on the server. I made a simple app with barely nothing except installing rgdal and error is reproduced.
 
Is someone met the same error?
Is someone can confirm my thought?
What can I do?

Thanks for reading.
Cheers.

P.S : I just have a free account...

Joshua Spiewak

unread,
Jun 12, 2017, 10:11:32 AM6/12/17
to shinyapps.io Users
What is the output of rsconnect::appDependencies() ?
libgdal is installed, but it had been 1.10.1.
The sf package installer for shinyapps.io was created to use a newer version, and as a consequence rgdal and sf would no longer play nicely.
I just deployed an installer for rgdal that uses the same version of libgdal as sf.
I likely will need to purge rgdal from our package cache, but meantime could you try disabling the package cache for your application and let me know if it works?
Message has been deleted

chc...@gmail.com

unread,
Jun 12, 2017, 6:34:21 PM6/12/17
to shinyapps.io Users
i have the same issue with my app

2:32:00.564307+00:00 shinyapps[188498]: Warning: Error in : package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
2017-06-12T22:32:00.567973+00:00 shinyapps[188498]:     13: runApp
2017-06-12T22:32:00.564310+00:00 shinyapps[188498]:  unable to load shared object '/usr/local/lib/R/site-library/rgdal/libs/rgdal.so':
2017-06-12T22:32:00.567972+00:00 shinyapps[188498]:     54: tryCatchList
2017-06-12T22:32:00.564311+00:00 shinyapps[188498]:   libgdal.so.1: cannot open shared object file: No such file or directory
2017-06-12T22:32:00.567969+00:00 shinyapps[188498]: Stack trace (innermost first):
2017-06-12T22:32:00.567971+00:00 shinyapps[188498]:     56: value[[3L]]
2017-06-12T22:32:00.567971+00:00 shinyapps[188498]:     55: tryCatchOne
2017-06-12T22:32:00.567972+00:00 shinyapps[188498]:     53: tryCatch
2017-06-12T22:32:00.567973+00:00 shinyapps[188498]:     52: library
2017-06-12T22:32:00.567976+00:00 shinyapps[188498]:      7: connect$retry
2017-06-12T22:32:00.567977+00:00 shinyapps[188498]:      4: eval
2017-06-12T22:32:00.567974+00:00 shinyapps[188498]:     12: fn
2017-06-12T22:32:00.567977+00:00 shinyapps[188498]:      2: eval.parent
2017-06-12T22:32:00.567975+00:00 shinyapps[188498]:     10: tryCatchOne
2017-06-12T22:32:00.567977+00:00 shinyapps[188498]:      3: eval
2017-06-12T22:32:00.567975+00:00 shinyapps[188498]:      9: tryCatchList
2017-06-12T22:32:00.567975+00:00 shinyapps[188498]:      8: tryCatch
2017-06-12T22:32:00.567976+00:00 shinyapps[188498]:      6: eval
2017-06-12T22:32:00.567978+00:00 shinyapps[188498]:      1: local
2017-06-12T22:32:00.567974+00:00 shinyapps[188498]:     11: doTryCatch
2017-06-12T22:32:00.568136+00:00 shinyapps[188498]: Error : package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
2017-06-12T22:32:00.568138+00:00 shinyapps[188498]:   libgdal.so.1: cannot open shared object file: No such file or directory
2017-06-12T22:32:00.568137+00:00 shinyapps[188498]:  unable to load shared object '/usr/local/lib/R/site-library/rgdal/libs/rgdal.so': 
2017-06-12T22:32:00.567976+00:00 shinyapps[188498]: 5: eval 

Florian Zenoni

unread,
Jun 13, 2017, 3:09:25 AM6/13/17
to shinyapps.io Users
Dear all,

Same problem here (see attachment).
Here follows the output of rsconnect::appDependencies(). Disabling the package cache didn't change anything.

 package version source 1 MASS 7.3-47 CRAN 2 R6 2.2.1 CRAN 3 RColorBrewer 1.1-2 CRAN 4 Rcpp 0.12.11 CRAN 5 assertthat 0.2.0 CRAN 6 backports 1.1.0 CRAN 7 base64enc 0.1-3 CRAN 8 bitops 1.0-6 CRAN 9 caTools 1.17.1 CRAN 10 colorspace 1.3-2 CRAN 11 crosstalk 1.0.0 CRAN 12 data.table 1.10.4 CRAN 13 dichromat 2.0-0 CRAN 14 digest 0.6.12 CRAN 15 evaluate 0.10 CRAN 16 flexdashboard 0.5 CRAN 17 ggplot2 2.2.1.9000 github 18 ggthemes 3.4.0 CRAN 19 gridExtra 2.2.1 CRAN 20 gtable 0.2.0 CRAN 21 highr 0.6 CRAN 22 htmltools 0.3.6 CRAN 23 htmlwidgets 0.8 CRAN 24 httpuv 1.3.3 CRAN 25 jsonlite 1.5 CRAN 26 knitr 1.16 CRAN 27 labeling 0.3 CRAN 28 lattice 0.20-35 CRAN 29 lazyeval 0.2.0 CRAN 30 leaflet 1.1.0 CRAN 31 magrittr 1.5 CRAN 32 markdown 0.8 CRAN 33 mime 0.5 CRAN 34 munsell 0.4.3 CRAN 35 packrat 0.4.8-1 CRAN 36 plyr 1.8.4 CRAN 37 png 0.1-7 CRAN 38 raster 2.5-8 CRAN 39 reshape2 1.4.2 CRAN 40 rgdal 1.2-7 CRAN 41 rlang 0.1.1 CRAN 42 rmarkdown 1.5 CRAN 43 rprojroot 1.2 CRAN 44 scales 0.4.1 CRAN 45 shiny 1.0.3 CRAN 46 sourcetools 0.1.6 CRAN 47 sp 1.2-4 CRAN 48 stringi 1.1.5 CRAN 49 stringr 1.2.0 CRAN 50 tibble 1.3.3 CRAN 51 viridis 0.4.0 CRAN 52 viridisLite 0.2.0 CRAN 53 xtable 1.8-2 CRAN 54 yaml 2.1.14 CRAN

rgdal.PNG

Joshua Spiewak

unread,
Jun 13, 2017, 8:09:12 AM6/13/17
to shinyapps.io Users
I have purged the existing entries for rgdal and have successfully deployed an app that does:

library(rgdal)

logo <- system.file("pictures/Rlogo.jpg", package="rgdal")[1]
x <- GDAL.open(logo)
opar <- par(no.readonly=TRUE)
par(mfrow=c(2,2))
displayDataset(x, band=1, reset.par=FALSE)
displayDataset(x, band=2, reset.par=FALSE)
displayDataset(x, band=3, reset.par=TRUE)
par(opar)
dx <- RGB2PCT(x, band=1:3)
displayDataset(dx)
GDAL.close(x)
GDAL.close(dx)

I am surprised that disabling the package cache didn't do the trick, but hopefully this is fixed now.

Florian Zenoni

unread,
Jun 13, 2017, 8:25:17 AM6/13/17
to shinyapps.io Users
Dear Joshua,

I confirm that my application is currently up and running.
Thank you very much for your prompt reaction.

Cheers,
Florian
Reply all
Reply to author
Forward
0 new messages