因为 https://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip被墙, 需要手动安装stringi:
In addition: Warning messages:
1: In download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") :
URL https://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip: cannot open destfile '/opt/R/R-4.0.2/my_packages/stringi/icudt//icu4c-69_1-data-bin-l.zip', reason 'No such file or directory'
2: In download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") :
download had nonzero exit status
3: In download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") :
URL http://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip: cannot open destfile '/opt/R/R-4.0.2/my_packages/stringi/icudt//icu4c-69_1-data-bin-l.zip', reason 'No such file or directory'
4: In download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") :
download had nonzero exit status
Execution halted
*** *********************************************************************
*** stringi cannot be built.
*** Failed to download the ICU data library (icudt). Stopping now.
*** For build environments that have no internet access,
*** see the INSTALL file for a workaround.
*** *********************************************************************
ERROR: configuration failed for package ‘stringi’
在github下载源码, 再解压到my_packages,最后手动安装:
/opt/R/R-4.0.2/bin/R CMD INSTALL --configure-vars='ICUDT_DIR=/opt/R/R-4.0.2/my_packages/stringi-master/src/icu69/data' stringi_1.7.12.tar.gz
最后成功的结果是这样的:
installing via 'install.libs.R' to /opt/R/R-4.0.2/lib64/R/library/00LOCK-stringi/00new/stringi
icudt already downloaded
decompressing icudt /opt/R/R-4.0.2/my_packages/stringi-master/src/icu69/data/icu4c-69_1-data-bin-l.zip to: /opt/R/R-4.0.2/lib64/R/library/00LOCK-stringi/00new/stringi/libs
icudt has been installed successfully
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (stringi)