Can't deploy arrow package to Posit Connect

157 views Asked by At

I have a Plumber API in R that I need to publish to R Studio Connect (Posit). During deployment I encounter this error:

Cannot install arrow: a C++17 compiler is required

I tried adding a renv.lock to the package but this had no effect.

The deployment code I am using is:

rsconnect::deployApp(appPrimaryDoc = "plumber_api_file.R",   
                 appFiles = c("plumber_api_file.R", "requirements.txt", "renv.lock", ".Rprofile"),   
                 contentCategory = "api",  
                 appName = "some_plumber_api") 

The API works fine locally.

1

There are 1 answers

0
greenjune On

It seems like you have a missing system dependency on your machine that hosts Posit Connect. It's probably a compiler that is required to build the Arrow R package. Even though you may have everything set up locally this should be configured on the Posit Connect machine as well. You should ask your system administrator to install and configure the necessary dependency on the Posit Connect machine.

From the Aarrow R package requirements:

As of version 10.0.0, arrow requires a C++17 compiler to build. For gcc, this generally means version 7 or newer. Most contemporary Linux distributions have a new enough compiler; however, CentOS 7 is a notable exception, as it ships with gcc 4.8.

See details in the documentation.