Hello,
I’d like to install R packages I got from CRAN repository, for example, RJDBC.
First, I tried to install rJava package because it is required for RJDBC.
I get rJava_0.9-8.tar.gz from CRAN site and upload to z/OS USS.
https://cran.r-project.org/web/packages/rJava/index.html
And then I issued install command but failed.
$ R -e 'install.packages(c("rJava_0.9-8.tar.gz"), repos = NULL, type="source")'
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: i370-ibm-openedition (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages(c("rJava_0.9-8.tar.gz"), repos = NULL, type="source")
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone '' (open failed for "/usr/lpp/R332/R/lib/R/share/zoneinfo/UTC0")
* installing *source* package 'rJava' ...
** package 'rJava' successfully unpacked and MD5 sums checked
trap: ./configure 1956: FSUM7327 signal number 13 not conventional
checking for gcc... /u/pdharr/Rnew/devel-dist/bin/xlc_echocmd
checking whether the C compiler works... no
configure: error: in `/ZOS1/tmp/Rtmp3I0Jcq/R.INSTALL401004b63ac4b77/rJava':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package 'rJava'
* removing '/V1R11/usr/lpp/R332/R/lib/R/library/rJava'
Warning message:
In install.packages(c("rJava_0.9-8.tar.gz"), repos = NULL, type = "source") :
installation of package 'rJava_0.9-8.tar.gz' had non-zero exit status
>
I unpacked python-r-devel in /usr/lpp/R332/python-devel and I set environment variables in .profile
# env for python-devel
export BD=/usr/lpp/R332/python-devel
export PATH=$BD/bin:$PATH
export LIBPATH=$BD/lib:$LIBPATH
export PKG_CONFIG_PATH=$BD/lib/pkgconfig:$BD/share/pkgconfig
export CURL_CA_BUNDLE=$BD/etc/ssl/cacert.pem
export FFI_LIB=$BD/lib/ffi
export X11_DIST=$BD
export DEVEL_DIST=$BD
# env for R332
export _BPXK_AUTOCVT=ON
export BASE=/usr/lpp/R332/R
export PATH=$BASE/bin:$PATH
export LIBPATH=$BASE/lib:$LIBPATH
export PKG_CONFIG_PATH=$BASE/lib/pkgconfig:$PKG_CONFIG_PATH
export TZDIR=$BASE/lib/R/share/zoneinfo
export RHOME=$BASE/lib/R
export R_DIST=$BASE
How can I insatall R packages?
regards.
Tomohiro Taguchi