We\'re bumbling through making some R code work in a production environment and as part of that we\'re installing some R packages as follows:
# Default direc
I had the same problem. What I did is similar to the solution proposed by gagolews. Gagolews' solution didn't exactly work for me because I couldn't find a zip copy of stringi to download. I downloaded icudt from http://static.rexamine.com/packages/icudt52l.zip to a folder, say /home/tmp/ then I installed from the net, but providing the local copy of icudt, by typing the following in R:
install.packages("stringi", # this will install from online
configure.vars="ICUDT_DIR=/home/tmp/") #but use the downloaded version of icudt
This worked for me.
Note: for Stringi >= 0.5-1 please check the answer by @gagolews
From INSTALL file:
The stringi package depends on the ICU4C >= 50 library.
So libicu42
is far to old.
If you check install.R file you'll find following lines:
mirrors <- c("http://static.rexamine.com/packages/",
"http://www.mini.pw.edu.pl/~gagolews/stringi/",
"http://www.ibspan.waw.pl/~gagolews/stringi/")
A couple of lines later you'll find something like this:
if (!grepl("^https?://", href)) {
# try to copy icudt from a local repo
if (!file.exists(href)) return("no icudt in a local repo")
If you add local path at the beginning of the mirrors
and put downloaded libraries it seems to work as expected. Here you can a patch I've used:
https://gist.github.com/zero323/338c8fb0faf46e5ac06d
So my solution would be to:
There is probably a better way, but that is what I came up so far.
git clone https://github.com/gagolews/stringi.git
..Rbuildignore
file and get rid of the ^src/icu55/data
line.R CMD build stringi_dir_name
to build tar.gz file..tar.gz
file on your machine(s), e.g.,
via install.packages("stringi_xxx.tar.gz")
This work with R-3.2.3 in Linux Mint 17.2. 1. Install 'libicu-dev' from Software Manager. 2. in R : install.packages('stringi')
For further information, try to read this instruction: https://cran.r-project.org/web/packages/stringi/INSTALL
This will be fixed in the upcoming 0.5-1 version of stringi
, see this feature request.
An appropriate environmental variable (ICUDT_DIR
) is now used by the ./configure
script to indicate the directory from which a local copy of icudt
should be fetched. It can be provided for example via a call to:
install.packages("stringi_0.5-1.zip", # assuming that we install from a downloaded archive
configure.vars="ICUDT_DIR=<dir_to_copy_icudt_from>")