unable to access index for repository/Problem with the SSL CA cert (path? access rights?)

Hi all,

out of nowwhere I can't install packages anymore.

On Ubuntu 22.04, I followed this advice to get RStudio running. Before that, I used R with the terminal and Emacs for a few days.
When I installed RStudio I could install packages at first, but now I get the following error message when I want to install any package:

> install.packages("renv")
Warning in install.packages :
  unable to access index for repository https://cran.uni-muenster.de/src/contrib:
  cannot open URL 'https://cran.uni-muenster.de/src/contrib/PACKAGES'
Installing package into ‘/home/XX/.local/lib/Rx86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://cran.uni-muenster.de/src/contrib:
  cannot open URL 'https://cran.uni-muenster.de/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘renv’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

From multiple other threads I checked multiple things:

  1. I can't install packages in a R --vanilla session. As I understand it, it means that no Renviron/Rprofile-File can be responsible for my troubles.
  2. Changing repos via options(repo=c('XY')) does not help
  3. I find the following message under Rstudio/Tools/Global Options.../Packages, but have no idea where it could come from (I checked all files suggested by ?Startup. image
  4. Installing a new daily build did also not help.
  5. chooseCRANmirror() returns
Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
  URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'Problem with the SSL CA cert (path? access rights?)'

also after having reinstalled ssl-certs and ca-certificates

I have no clue what happend, and greatly appreciate any pointers!

Best
Jonas

Found that the problem was in fact with the CA certificates.

I got them in order via:

sudo rm -f /etc/ssl/certs/ca-bundle.crt
sudo apt reinstall ca-certificates
sudo update-ca-certificates

This is solved now. :slight_smile:

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.