手动安装R包stringi

因为 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)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值