Deploying with choroplethr package

I have a Shiny app that has been working for about a year and just tried to redeploy it with a few minor changes, but am getting this error due to the 'rgdal' package:

  • installing source package ‘rgdal’ ...
    ** package ‘rgdal’ successfully unpacked and MD5 sums checked
    configure: error: pcs.csv not found in GDAL data directory.
    ERROR: configuration failed for package ‘rgdal’
  • removing ‘/opt/R/3.5.1/lib/R/library/rgdal’
    ################################# End Task Log #################################
    Error: Unhandled Exception: Child Task 1078109480 failed: Error building image: Build exited with non-zero status: 1
    Execution halted

Following the recommendation here, I unchecked the "Package Cache" build setting in shinyapps.io and redeployed, but the app will still not deploy, this time returning the error below due to the 'foreign' package:

installing to /opt/R/3.5.1/lib/R/library/foreign/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded

  • creating tarball
    packaged installation of ‘foreign’ as ‘foreign_0.8-70_R_x86_64-pc-linux-gnu.tar.gz’
  • DONE (foreign)
    /mnt
    [2022-01-07T08:16:00.938607880+0000] Building R package: glue (1.3.0)
    /mnt/packages/build /mnt
    make: Entering directory '/tmp/RtmppVZSSd/R.INSTALLe7d296dfc/glue/src'
    gcc -I"/opt/R/3.5.1/lib/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -c glue.c -o glu################################# End Task Log #################################
    Error: Unhandled Exception: Child Task 1078111041 failed: Error building image: Build exited with non-zero status: 1
    Execution halted

I have already tried deleting the app and redeploying with a fresh one, which did not work either.

The app seems to deploy when I remove the "choroplethr" package, but unfortunately I need this package for my app to work properly. Any advice on how to deploy an app with the "choroplethr" package would be greatly appreciated!

Hi there!

A bit of a messy problem to troubleshoot from this end. I see you're running on 3.5.1, have you tried to deploy with a much newer version of R? I know that choroplethr only requires 3.5.0 but some of the dependencies might not have stayed within 3.5.0.

1 Like

Upgrading to the latest version of R and RStudio worked! Thank you so much for the solution!

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.