Posit Public Package Manager#
Overview#
Posit Public Package Manager is a free, hosted instance of Posit Package Manager for community use.
This page provides answers for frequently asked questions related to Posit Public Package Manager, as well as links to useful resources.
Info
Posit does **not** provide professional support for Posit Public Package Manager. If you need help, the best place to ask questions is in the [Posit Community](https://community.rstudio.com/c/r-admin/package-manager/21?tags=package-manager). If you're reporting a problem, please create a topic and provide as much information as you can.
Frequently Asked Questions#
How do I install R or Python packages?#
See the Getting Started Using Package Manager section of the user guide for steps to install these packages.
How do I install binary packages for R?#
Posit Public Package Manager provides precompiled binaries for CRAN packages on Linux, Mac, and Windows for the five most recent versions of R.
For instructions on how to install binary packages for R, see the Setting Your Distribution for R Binary Packages section of the user guide.
Note
An R environment may require additional configuration steps to use binary packages from Package Manager, particularly on Linux. Consult the documentation for Configuring R on Linux or Configuring R on Windows to learn more.
After installing binary packages on Linux, a message similar to the example below displays:
install.packages("ggplot2")
...
* installing *binary* package ‘ggplot2’ ...
After installing binary packages on Windows, a message similar to the example below displays:
install.packages("ggplot2")
...
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\user\AppData\Local\Temp\RtmpiswaaW\downloaded_packages
How do I troubleshoot R package installation issues?#
Source package received from a binary repository URL#
When installing packages from a binary repository URL, you may receive a source package instead of a binary package. When this happens, a message similar to the example below displays in the R console:
install.packages("RPostgreSQL")
...
* installing *source* package ‘RPostgreSQL’ ...
In interactive R sessions on Windows, a message similar to the example below may display:
install.packages("dplyr")
Package which is only available in source form, and may need
compilation of C/C++/Fortran: 'dplyr'
Do you want to attempt to install these from sources? (Yes/no/cancel)
Check that you have the correct binary repository URL for your operating system, and that you have met the prerequisites for using binary packages (as outlined in the Configuring R on Windows or macOS or Configuring R on Windows documentation).
Otherwise, binaries may not be available for that package. Package Manager does not provide binaries for all CRAN packages. Notable exclusions include any CRAN packages with Bioconductor dependencies, such as Seurat or WGCNA.
Error loading binary package in R#
When loading binary packages in R, a message similar to the examples below may display:
library(rJava)
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/opt/R/3.6.3/lib/R/library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
library(sf)
Error: package or namespace load failed for 'sf' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/opt/R/3.6.3/lib/R/library/units/libs/units.so':
libudunits2.so.0: cannot open shared object file: No such file or directory
library(Rcpp)
Error: package or namespace load failed for ‘Rcpp’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/opt/R/3.6.3/lib/R/library/Rcpp/libs/Rcpp.so':
/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/R/3.6.3/lib/R/library/Rcpp/libs/Rcpp.so)
Check that you have the correct binary repository URL for your operating system, and that you have met the prerequisites for using binary packages (as outlined in the Configuring R on Linux or Configuring R on Windows or macOS documentation).
The most common issue is that your system is missing additional system prerequisites for the package. If a package has additional system prerequisites, you can find instructions to install those on the Install System Prerequisites section of the Setup page on the Package Manager interface.
If you still see an error after installing the system prerequisites, please report the issue in the Posit Community and provide as much information as you can, including your R version and operating system.
Why are the latest packages unavailable?#
The Package Manager team evaluates CRAN, Bioconductor, and PyPI each business day (Monday through Friday) and publishes new snapshots when updates are available. Then, Posit Public Package Manager syncs these snapshots daily.
For example, suppose a CRAN package gets updated on Saturday. A new snapshot will be published and made available some time on Monday. However, this schedule is subject to change without notice. Large updates, external repository errors or inconsistencies, and other unanticipated situations may occasionally delay these updates.
Additional resources#
The Posit Package Manager User Guide can be helpful for learning how to use Posit Public Package Manager, including steps for:
- Installing binary packages for R.
- Installing R or Python packages from a historical snapshot.
- Navigating the web interface.