简体   繁体   English

在R中安装stringi库时出现icudt错误

[英]icudt error while installing stringi library in R

I'm writing this because it took me several days to come to this result. 我写这篇文章是因为花了几天的时间才得出这个结果。

Bottom line: The stringi library version 1.1.3 (released March 2017) might have issues involving icudt. 底线:字符串库版本1.1.3(2017年3月发布)可能存在涉及icudt的问题。 You can install stringi 1.1.2 using the following commands: 您可以使用以下命令安装stringi 1.1.2:

packageurl <- "https://cran.r-project.org/src/contrib/Archive/stringi/stringi_1.1.2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

I put this together from some RStudio documentation on how to install an older package . 我从一些RStudio文档中收集了有关如何安装旧软件包的信息

Background: 背景:

I was trying to install the forecast library in R. Originally, I was using R 3.1.2. 我试图在R中安装预测库。最初,我使用R 3.1.2。 I also installed R 3.3.3 and tried to install stringi it. 我还安装了R 3.3.3并尝试安装stringi。 I'm running CentOS 6.7 and don't have a choice to upgrade. 我正在运行CentOS 6.7,没有选择进行升级。

Forecast failed to install due to issues installing stringi. 由于安装stringi的问题,预测无法安装。 The stringi library failed to install due to errors downloading ICU data library (icudt) It looks like stringi 1.1.3 added download/build logic regarding icudt, and upcoming version 1.1.4 has corrections to this logic (as of date 2017-04-02). 由于下载ICU数据库(icudt)时出错,stringi库未能安装。看起来stringi 1.1.3添加了有关icudt的下载/构建逻辑,而即将发布的1.1.4版对此逻辑进行了更正(截至2017-04-04) 02)。

I went to the ICU project site: and downloaded/installed the ICU library that appeared to be specified in the error messages below: 我去了ICU项目站点:并下载/安装了似乎在以下错误消息中指定的ICU库:

checking whether we may compile src/icu55/common/umapfile.c... yes
checking whether we may compile src/icu55/common/putil.cpp... yes
checking whether we can fetch icudt... WARNING: ignoring environment value of R_HOME
downloading ICU data library (icudt)
output path: icu55/data/icudt55l.zip
Error in stri_download_icudt("icu55/data") :
  could not find function "dir.exists"
Calls: identical -> stri_download_icudt
Execution halted
*** icudt could not be downloaded. stopping.
ERROR: configuration failed for package ‘stringi’

Searches online for icu55, icudt55l.zip, or any procedure that followed to get past this error didn't turn up a procedure that worked. 在线搜索icu55,icudt55l.zip或为了克服该错误而执行的任何操作均未找到有效的程序。 I downloaded, built, and installed ICU 55.1 and also ICU 58.2. 我下载,构建和安装了ICU 55.1以及ICU 58.2。 I also updated gcc and g++. 我还更新了gcc和g ++。 The CRAN repository install notes for stringi 1.1.3 don't currently give a straightforward set of instructions to successfully install stringi when I have a working internet connection. 当我有正常的Internet连接时,stringi 1.1.3的CRAN存储库安装说明当前未提供一套简单的说明来成功安装stringi。

I started by asking this as a question and then found my answer. 我首先问这个问题,然后找到答案。 I'll post it anyways. 无论如何,我都会发布。 I had added several links but needed to remove them because I don't have enough cred to get away with them. 我添加了几个链接,但需要删除它们,因为我没有足够的信誉来摆脱它们。

This has nothing to do with ICU. 这与ICU无关。 This is a bug in stringi, which I have already fixed in version 1.1.5 (now on CRAN). 这是stringi中的一个错误,我已经在1.1.5版(现在在CRAN中)中对此进行了修复。 The dir.exists() function is specific to R ≥ 3.2.0 - I wasn't aware of that. dir.exists()函数特定于dir.exists()我没有意识到。 Sorry for inconvenience. 对造成的不便表示歉意。

The stringi library version 1.1.3 (released March 2017) might have issues involving icudt. 字符串库版本1.1.3(于2017年3月发布)可能存在涉及icudt的问题。 You can install stringi 1.1.2 using the following commands: 您可以使用以下命令安装stringi 1.1.2:

packageurl <- "https://cran.r-project.org/src/contrib/Archive/stringi/stringi_1.1.2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM