> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing Archived R Packages No Longer Available on CRAN

> R packages removed from CRAN can be installed from the archive. Download the .tar.gz directly and use install.packages(pkgs=pkgFile, type="source", repos=NULL) to install.

### **Version/Environment (if relevant):**

All Domino versions

## **Issue:**

RStudio CRAN repository has removed a number of packages, which are now only available in the CRAN archive at [https://cran.r-project.org/src/contrib/Archive/](https://cran.r-project.org/src/contrib/Archive/). When attempting to install such a package using the standard `install.packages()` command, R returns a warning that the package is no longer available. For example:

```
> install.packages('RSQLServer')
Installing package into "/usr/local/lib/R/site-library"
(as "lib" is unspecified)
Warning in install.packages :
package "RSQLServer" 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
```

## **Root Cause:**

The package has been removed from the active CRAN repository and is no longer returned by the standard `install.packages()` function. The package still exists in the CRAN archive but must be installed directly from the archive URL using a source-based install method.

## **Resolution:**

Install the package directly from the CRAN archive using the following code (replace the URL and filename with the specific package version needed):

```
> url <- "https://cran.r-project.org/src/contrib/Archive/RSQLServer/RSQLServer_0.3.0.tar.gz"
> pkgFile <- "RSQLServer_0.3.0.tar.gz"
> download.file(url = url, destfile = pkgFile)
trying URL 'https://cran.r-project.org/src/contrib/Archive/RSQLServer/RSQLServer_0.3.0.tar.gz'
Content type 'application/x-gzip' length 633887 bytes (619 KB)
==================================================
downloaded 619 KB

> install.packages(pkgs=pkgFile, type="source", repos=NULL)
Installing package into "/usr/local/lib/R/site-library"
(as "lib" is unspecified)
* installing *source* package "RSQLServer" ...
** package "RSQLServer" successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (RSQLServer)
> library("RSQLServer")
```

### **Notes/Information:**

The full CRAN archive is available at [https://cran.r-project.org/src/contrib/Archive/](https://cran.r-project.org/src/contrib/Archive/). Browse to the package directory to find available versions and their corresponding `.tar.gz` download URLs.


## Related topics

- [How-to guides](/knowledge-base/how-to-guides-overview.md)
- [Unable to install R package | Error : Package is not available for your version of R](/knowledge-base/unable-to-install-r-package-error-package-is-not-available-for-your-version-of-r.md)
- [Use Restricted Environments](/cloud/admin/platform-configuration/manage-compute-environments/restricted-environments.md)
- [R package](/cloud/reference/r-package/domino-r-package.md)
