【问题标题】:icudt error while installing stringi package from r in linux offline在 linux 中从 r 离线安装 stringi 包时出现 icudt 错误
【发布时间】:2019-07-04 04:46:17
【问题描述】:

我已经在我的系统(RedHat Linux 7)中下载了 stringi_1.4.3.tar.gz 包,但是当我尝试离线安装时,我收到如下错误:

执行停止 *** icudt 下载失败。停止。 错误:包'stringi'的配置失败

这是一个新环境RedHatLinux 7.x,R版本是3.6,这里我正在测试离线安装R设置和R包,我遇到了这个错误。

我已经尝试下载旧版本的stringi,但没有成功。

使用 pkg-config 检查系统 ICU4C... 50.1.2 检查 ICU4C >= 52... 否 * 已检测到 ICU4C 50.1.2 不满足最低要求,即 ICU4C >= 52 尝试使用“标准”后备标志 检查我们是否可以构建一个基于 ICU4C 的项目......是的 以编程方式检查是否有足够的 U_ICU_VERSION_MAJOR_NUM... 否 * 可用的 ICU4C 无法使用 检查我们是否可以编译 src/icu61/common/putil.cpp... 是 检查我们是否可以编译 src/icu61/i18n/number_affixutils.cpp... 是 检查我们是否可以获取 icudt... 下载 ICU 数据库 (icudt) 输出路径:icu61/data/icudt61l.zip 尝试 URL 'http://www.ibspan.waw.pl/~gagolews/stringi/icudt61l.zip' download.file 中的错误(粘贴(href,fname,sep =“”),icudtzipfname,mode =“wb”):无法打开 URL XXX

正在尝试 URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip' download.file 中的错误(粘贴(href,fname,sep =“”),icudtzipfname,mode =“wb”):无法打开 URL XXX

正在尝试 URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu55/data/icudt61l.zip' download.file 中的错误(粘贴(href,fname,sep =“”),icudtzipfname,mode =“wb”):无法打开 URL XXX

正在尝试 URL 'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip' download.file 中的错误(粘贴(href,fname,sep =“”),icudtzipfname,mode =“wb”):无法打开 URL XXX

正在尝试 URL 'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu55/data/icudt61l.zip' download.file 中的错误(粘贴(href,fname,sep =“”),icudtzipfname,mode =“wb”):无法打开 URL XXX

正在尝试 URL 'http://www.gagolewski.com/software/stringi/icudt61l.zip' download.file 中的错误(粘贴(href,fname,sep =“”),icudtzipfname,mode =“wb”):无法打开 URL XXX

icudt 下载失败 错误:错误停止 另外:警告信息: 1:在 download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") : XXX 状态为“无法连接到服务器” 2:在 download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") 中: URL XXX 状态为“无法连接到服务器” 3:在 download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") 中: URL XXX 状态为“无法连接到服务器” 4:在 download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") 中: URL XXX 状态为“无法连接到服务器” 5:在 download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") : URL XXX 状态为“无法连接到服务器” 6:在 download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") 中: URL XXX 状态为“无法连接到服务器” 执行停止 *** icudt 下载失败。停止。 错误:包“stringi”的配置失败 * 删除'/usr/lib64/R/library/stringi'

我在 Windows 10 上下载并安装了它,在那里 ii 按预期工作。我想要 stringi 包,因为它依赖于其他包。请帮助

【问题讨论】:

    标签: linux redhat offline stringi installation-package


    【解决方案1】:

    我的情况完全一样,我终于完成了该软件包的安装。 我去了https://cran.r-project.org/web/packages/stringi/INSTALL 并滚动了一下以找到答案。我引用:

    “如果您在计算机上绝对无法访问互联网 你尝试安装stringi,尝试获取最新的开发版本 的包。它已经包含ICU 数据存档。 您可以构建一个可分发的源包,其中包括所有必需的 ICU 数据文件(供离线使用)通过省略一些相关行 .Rbuildignore 文件。以下命令序列应该可以解决问题:

    wget https://github.com/gagolews/stringi/archive/master.zip -O stringi.zip
    unzip stringi.zip
    sed -i '/\/icu..\/data/d' stringi-master/.Rbuildignore
    R CMD build stringi-master
    

    假设最新的开发版本是 1.3.1, 在当前工作目录中创建一个名为stringi_1.3.1.tar.gz 的文件。 现在可以安装包(源包可以通过 scp 等)通过执行:

    R CMD INSTALL stringi_1.3.1.tar.gz
    

    或致电install.packages("stringi_1.3.1.tar.gz", repos=NULL), 从 R 会话中。”

    对于 wget 部分,我只需要直接从链接下载并将其发送到我的服务器,然后我就可以直接解压缩 :)

    【讨论】:

    • 我得到:$ sed -i '/\/icu..\/data/d' stringi-master/.Rbuildignore sed: 1: "stringi-master/.Rbuildi ...":正则表达式中的未终止替换
    • This link 解决了我的问题,我在 Mac 上使用 BSD 工具,所以 sed 不同
    • 您好,我正在使用 Windows 构建 stringi。您能否分享一下 get-content PowerShell 命令将如何替换 .Rbuildignore 文件中的文本?我不熟悉 Unix 中的正则表达式。这个命令似乎失败了:get-content stringi-master/.Rbuildignore | %{$_ -replace "/\/icu..\","/data/d"}
    猜你喜欢
    • 1970-01-01
    • 2021-07-19
    • 2021-08-07
    • 1970-01-01
    • 2018-04-24
    • 2016-12-19
    • 2020-09-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多