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.
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:
See details in the documentation.