Install package using previous CRAN snapshot

Problem

You are trying to install a library package via CRAN, and are getting a Library installation failed for library due to infra fault error message.

Library installation failed for library due to infra fault for Some(cran {
package: "<name-of-package>"
}
). Error messages:
java.lang.RuntimeException: Installation failed with message:

Error installing R package: Could not install package with error: installation of package <U+2018><name-of-package><U+2019> had non-zero exit status

Cause

CRAN maintains daily snapshots. If a snapshot is invalid for some reason, you get an error when trying to install a package.

Solution

Specify a previous snapshot when installing your library.

  1. Check the date of the most recent snapshot at https://cran.microsoft.com/snapshot/.

  2. Pick a date that is at least one day older than the most recent snapshot. For example, if the most recent snapshot is dated July 9, 2021, you should use July 8, 2021.

  3. Enter the full URL to your chosen snapshot in the Repository field when you install the package on your cluster. To use the July 8, 2021 snapshot enter https://cran.microsoft.com/snapshot/2021-07-08/ as the full URL for the repository.

    Install CRAN library from a specific snapshot