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 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 RPM requires libgfortran.so.1, which may not be installed by default on your system. Install the RPM that contains libgfortran.so.1.

See the table below to determine how to install libgfortran.so.1.

Linux Version How to Install libgfortran

RHEL 6/7 and CentOS 6/7

Install the compat-libgfortran-41 RPM with the command:

$ yum install compat-libgfortran-41

Other supported platforms that use yum, such as SUSE.

You can determine the RPM needed for libgfortran.so.1 with the command:

$ yum whatprovides /usr/lib64/libgfortran.so.1

Typical packages that include libgfortran.so.1 include:

  • libgfortran-41-<any_minor_version>.rpm
  • compat-libgfortran-41-<any_minor_version>.rpm;
  • gcc41-fortran.rpm

Installing the Vertica R Language Pack

  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 .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
      $ rpm -Uvh vertica-R-lang_-version.rpm
    • Debian
      $ dpkg -i vertica-R-lang_-version.deb

The installer puts the R binary in /opt/vertica/R. The installer also adds the file vertica-udx-R.conf to /etc/ld.so.conf.d/. This file is removed if you uninstall the package.

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.

Note: 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.