Error when deploying to shinyapps.io after updating to R 4.0.2

I recently updated my version of R to 4.0.2 and a shinyapp now won't deploy. The issue seems to be with the rgdal package, see the error below:

Error: Unhandled Exception: Child Task 776097448 failed: Error building image: Error building rgdal (1.5-15). Build exited with non-zero status: 1
Execution halted

It used to work perfectly fine before I updated (v3.5.2), and it builds fine when using the app locally so I can only assume that it hasn't been built properly on the server. Hopefully someone can help me?

Thanks in advance!

1 Like

Same problem here. If I figure something out, I'll post. I did try specifying chasing dependencies, which got the build to go further, but it still didn't exit cleanly

install.packages("rgdal", dependencies = TRUE, repos='https://cran.rstudio.com/')

The problem was I needed to install a lot of supporting linux packages, particularly development packages, in order to have install.packages compile everything. Sorting through the errors from install.packages('rgdal') gave some hits for some of the packages, but not all of them.

Here's how the debug messages from the R install.packages looked

 Configuration failed to find Cairo or Freetype2. Try installing:
     * deb: libcairo2-dev (Debian, Ubuntu)
     * rpm: cairo-devel (Fedora, CentOS, RHEL)
     * csw: libcairo_dev (Solaris)
     * brew: cairo (OSX)

Here's all the Centos 8 packages I had to install, there's probably equivalently named Ubuntu packages

yum -y install cairo-devel gdal gdal-devel geos-devel libcurl-devel udunits2-devel nginx policycoreutils-python proj proj-devel R-devel oddjob oddjob-mkhomedir adcli adcli oddjob oddjob-mkhomedir sqlite sqlite-devel

gdal-devel and proj-devel were probably the biggest hangup. Can't build a spatial library like rgdal without those.

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