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
Vertica requires a version of the libgfortran4
library later than 7.1 to create R extensions. The libgfortran
library is included by default with the devtool
and gcc
packages.
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
-
Download the R language package by browsing to the Vertica website.
-
On the Support tab, select Customer Downloads.
-
When prompted, log in using your Micro Focus credentials.
-
Located and select the
vertica-R-lang_
version
.rpm
orvertica-R-lang_
version
.deb
file for your server version. The R language package version must match your server version to three decimal points. -
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.
Note
The R packages provided in the R Language Pack are automatically upgraded and do not need to be reinstalled.-
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. -
Upgrade your server package as detailed in Upgrading Vertica to a New Version.
-
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:
-
As root run
/opt/vertica/R/bin/R
and issue the command:> update.packages(checkBuilt=TRUE)
-
Select a CRAN mirror from the list displayed.
-
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.