无互联网环境下CentOS 7.9安装stringi遇ICU依赖下载失败问题
CentOS 7.9无网环境安装R stringi包常见问题
基础环境说明
- 操作系统:CentOS 7.9
- 网络限制:无公网访问权限,仅可连通CRAN软件源
- 离线准备:提前从CRAN下载
stringi_1.5.3.tar.gz源码包完成本地解压,解压后目录结构可参考对应附件
安装执行报错详情
运行本地源码包安装流程时,终端输出如下连续报错:
checking for pkg-config... /usr/bin/pkg-config checking with pkg-config for the system ICU4C... 50.2 checking for ICU4C >= 55... no *** ICU4C 50.2 has been detected *** Minimal requirements, i.e., ICU4C >= 55, are not met *** Trying with "standard" fallback flags checking whether we may build an ICU4C-based project... yes checking programmatically for sufficient U_ICU_VERSION_MAJOR_NUM... no *** The available ICU4C cannot be used checking whether we may compile src/icu61/common/putil.cpp... yes checking whether we may compile src/icu61/i18n/number_affixutils.cpp... yes checking whether we can fetch icudt... downloading the ICU data library (icudt) output path: icu61/data/icudt61l.zip trying URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip' Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip'
已完成的排查动作
- 参照技术社区公开的离线安装指引、stringi官方安装文档开展问题定位
- 尝试执行通用修复命令
sed -i '/\/icu..\/data/d' stringi-master/.Rbuildignore调整源码配置,但本地解压的CRAN发布版源码目录中不存在.Rbuildignore文件,无法完成对应配置修改
核心待解决诉求
需明确安装流程中download.file函数mode="wb"参数的调整方法,解决无公网环境下无法拉取icudt数据库引发的安装中断问题。
内容的提问来源于stack exchange,提问作者maniA
相关产品推荐
相关产品推荐

