Unable to install packages following renv::init() on Posit Workbench in ubuntu

Hi,
we are having a very strange situation with our Ubuntu installation of Posit Workbench. Everything generally works fine, except when we initialise a new project using renv. All users are getting the same problem. Once the project is initialised with renv::init() we cannot install new packages and get this error:

install.packages('lubridate')
renv was unable to query available packages from the following repositories:
Index of /src/contrib ------------------------------------
error downloading 'https://cloud.r-project.org/src/contrib/PACKAGES.rds' [error in running command]
error downloading 'https://cloud.r-project.org/src/contrib/PACKAGES.gz' [error in running command]
error downloading 'https://cloud.r-project.org/src/contrib/PACKAGES' [error in running command]
Error: package 'lubridate' is not available
$ /usr/local/bin/curl --version ----------------------------------------------
error in running command
Error executing '/usr/local/bin/curl --version': is your copy of curl functional?

We have been trying everything (except reinstalling libcurl as it means reinstalling Posit Connect). Also to clarify that outside of a project where renv has been initiated curl works fine and there are no problems installing packages.

Any pointers would be appreciated!

It looks like you have an installation of curl on the PATH that isn't functional, specifically at /usr/local/bin/curl. Is this expected? You can also try forcing renv to use a separate instance of curl with something like:

RENV_CURL_EXECUTABLE = /path/to/curl

to force the use of a specific curl executable. Please see Installing packages • renv for more details.

Thanks - we were trying to fix the curl installation there. The strange thing was that from the command line curl was working fine. However this week after deleting a bunch of old projects and remounting some shared drives it started working again. We're not sure what fixed it, but will keep an eye out and try the alternative instance option if it happens again.

It just happened again and we see the trigger is selecting R version 4.4.2.