Installing/Upgrading the R Language Pack for Vertica

To create R UDxs in Vertica, install the R Language Pack package that matches your server version. The R Language Pack includes the R runtime and associated libraries for interfacing with Vertica. You must use this version of the R runtime; you cannot upgrade it.

You must install the R Language Pack on each node in the cluster. The Vertica R Language Pack must be the only R Language Pack installed on the node.

Vertica R Language Pack Prerequisites

The R Language Pack package requires a number of packages for installation and execution. The names of these dependencies vary among Linux distributions. For Vertica supported Linux platforms the packages are:

  • RHEL/CentOS: libfortran, xz-libs, libgomp
  • SUSE Linux Enterprise Server: libfortran3, liblzma5, libgomp1
  • Debian/Ubuntu: libfortran3, liblzma5, libgomp1
  • Amazon Linux 2.0: compat-gcc-48-libgfortran, xz-libs, libgomp

Installing the Vertica R Language Pack

If you use your operating systems package manager, rather than the rpm or dpkg command, for installation, you do not need to manually install the R Language Pack. The native package managers for each supported Linux version are:

  • RHEL/CentOS: yum
  • SUSE Linux Enterprise Server: zypper
  • Debian/Ubuntu: apt-get
  • Amazon Linux 2.0: yum
  1. Download the R language package by going to the myVertica portal, clicking the downloads tab, and selecting the vertica-R-lang_-version.rpm (or vertica-R-lang_<version>.deb) file for your server version. The R language package version must match your server version to three decimal points.
  2. Install the package as root or using sudo:

    • RHEL/CentOS
      $ yum install vertica-R-lang-<version>.rpm
    • SUSE Linux Enterprise Server

      $ zypper install vertica-R-lang-<version>.rpm 
    • Debian
      $ apt-get install ./vertica-R-lang_<version>.deb
    • Amazon Linux 2.0
       $ yum install vertica-R-lang-<version>.AMZN.rpm

The installer puts the R binary in /opt/vertica/R.

Upgrading the Vertica R Language Pack

When upgrading, some R packages you have manually installed may not work and may have to be reinstalled. If you do not update your package(s), then R returns an error if the package cannot be used. Instructions for upgrading these packages are below.

The R packages provided in the R Language Pack are automatically upgraded and do not need to be reinstalled.

  1. You must uninstall the R Language package before upgrading Vertica. Any additional R packages you manually installed remain in /opt/vertica/R and are not removed when you uninstall the package.
  2. Upgrade your server package as detailed in Upgrading Vertica to a New Version.
  3. After the server package has been updated, install the new R Language package on each host.

If you have installed additional R packages, on each node:

  1. As root run /opt/vertica/R/bin/R and issue the command:
    > update.packages(checkBuilt=TRUE)
  2. Select a CRAN mirror from the list displayed.
  3. You are prompted to update each package that has an update available for it. You must update any packages that you manually installed and are not compatible with the current version of R in the R Language Pack.
    Do NOT update:
    • Rcpp
    • Rinside

    The packages you selected to be updated are installed. Quit R with the command:

    > quit()

Vertica UDx functions written in R do not need to be compiled and you do not need to reload your Vertica-R libraries and functions after an upgrade.