Shiny deployment, setting up non-CRAN repo, not working!

329 views
Skip to first unread message

Jonathan Simkin

unread,
Jan 17, 2021, 12:33:00 PM1/17/21
to Shiny - Web Framework for R

Hi all, 

I'm running into a deployment issue for my Shiny app.. I'm using a non-CRAN package called R-INLA. It can be installed from here:

install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)

The error message I get from the deploy tab is:

Error: Unhandled Exception: Child Task 855023332 failed: Error building image: Error fetching INLA (21.01.13) source. unable to satisfy package: INLA (21.01.13) In addition: Warning message: In FUN(X[[i]], ...) : Package 'INLA 21.01.13' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores Execution halted

Online and through colleagues I've been advised to add the INLA repo to my .Rprofile, so that when it deploys, it downloads straight from there:

local({ r <- c(INLA = "https://inla.r-inla-download.org/R/testing", CRAN = "https://cloud.r-project.org/") options(repos = r) })

Unfortunately, it hasn't worked! Any help/guidance would be extremely helpful.

Let me know if you need any more info.. I'm on a mac running R 4.03, and on RStudio 1.4.1103 preview version. _
platform x86_64-apple-darwin17.0
arch x86_64
os darwin17.0
system x86_64, darwin17.0
status
major 4
minor 0.3
year 2020
month 10
day 10
svn rev 79318
language R
version.string R version 4.0.3 (2020-10-10) nickname Bunny-Wunnies Freak Out

Thanks!

Jonathan

Joe Cheng

unread,
Jan 18, 2021, 10:50:20 PM1/18/21
to Jonathan Simkin, Shiny - Web Framework for R
shinyapps.io can only use packages that are on CRAN, BioC, or GitHub. Fortunately, it looks like R-INLA is on GitHub, maybe this will work:

install.packages("remotes") # if you don't already have it installed

# Then choose ONE of these three, depending on which version you want:
remotes::install_github("hrue/r-inla@devel", subdir = "rinla")  # 21 hours old
remotes::install_github("hrue/r-inla@stable", subdir = "rinla")  # 21 hours old
remotes::install_github("hrue/r-inla@master", subdir = "rinla")  # 7 months old

Then make sure your app still works, then try deploying to shinyapps.io.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/d8379c18-5734-4153-ab1c-d2967b663272n%40googlegroups.com.

Jonathan Simkin

unread,
Jan 19, 2021, 12:50:24 AM1/19/21
to Joe Cheng, Shiny - Web Framework for R
Thanks Joe! That's really helpful. I was able to deploy to Shiny (very excited about that). The only issue now is that I get an error below in the Shiny log. I spoke with the developers of that app and they think it's the version of the linux build they provide vs. what's compatible w/ Shiny linux server. Thoughts? Do you think there are any solutions to this issue?

Thanks!

Jonathan

Linux issue from Shiny Log

2021-01-17T21:05:17.568346+00:00 shinyapps[3482628]: /opt/R/4.0.3/lib/R/library/INLA/bin/linux/64bit/inla: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /opt/R/4.0.3/lib/R/library/INLA/bin/linux/64bit/libgfortran.so.4)
2021-01-17T21:05:17.568992+00:00 shinyapps[3482628]: Warning in system(paste(shQuote(inla.getOption("inla.call")), "-s -m qinv",  :
2021-01-17T21:05:17.568995+00:00 shinyapps[3482628]:   running command ''/opt/R/4.0.3/lib/R/library/INLA/bin/linux/64bit/inla.run' -s -m qinv -r auto -t 16 -S default /tmp/RtmpFvUsbB/file1a370ba96c/file1a41341cb1 /tmp/RtmpFvUsbB/file1a370ba96c/file1a221af2ac /tmp/RtmpFvUsbB/file1a370ba96c/file1a3563fde2' had status 1
2021-01-17T21:05:17.572002+00:00 shinyapps[3482628]: Warning: Error in inla.read.fmesher.file: file.exists(filename) is not TRUE
2021-01-17T21:05:17.609777+00:00 shinyapps[3482628]:   142: <Anonymous>
2021-01-17T21:05:17.613846+00:00 shinyapps[3482628]: Warning: Error in inla.read.fmesher.file: file.exists(filename) is not TRUE
2021-01-17T21:05:17.617946+00:00 shinyapps[3482628]:   131: <Anonymous>
2021-01-17T21:05:17.624014+00:00 shinyapps[3482628]:   114: <Anonymous>
2021-01-17T21:05:17.620636+00:00 shinyapps[3482628]: Warning: Error in inla.read.fmesher.file: file.exists(filename) is not TRUE
--
Jonathan Simkin, MPH
PhD Candidate
School of Population and Public Health
University of British Columbia
Telephone: 778-833-1288

Joe Cheng

unread,
Jan 19, 2021, 2:43:43 AM1/19/21
to Jonathan Simkin, Shiny - Web Framework for R
Googling around for that first line turns up this:

Can't guarantee any of the solutions in that thread will work but that seems like the place to follow up if they don't.
Reply all
Reply to author
Forward
0 new messages