簡體   English   中英

在R中安裝stringi庫時出現icudt錯誤

[英]icudt error while installing stringi library in R

我寫這篇文章是因為花了幾天的時間才得出這個結果。

底線:字符串庫版本1.1.3(2017年3月發布)可能存在涉及icudt的問題。 您可以使用以下命令安裝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")

我從一些RStudio文檔中收集了有關如何安裝舊軟件包的信息

背景:

我試圖在R中安裝預測庫。最初,我使用R 3.1.2。 我還安裝了R 3.3.3並嘗試安裝stringi。 我正在運行CentOS 6.7,沒有選擇進行升級。

由於安裝stringi的問題,預測無法安裝。 由於下載ICU數據庫(icudt)時出錯,stringi庫未能安裝。看起來stringi 1.1.3添加了有關icudt的下載/構建邏輯,而即將發布的1.1.4版對此邏輯進行了更正(截至2017-04-04) 02)。

我去了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’

在線搜索icu55,icudt55l.zip或為了克服該錯誤而執行的任何操作均未找到有效的程序。 我下載,構建和安裝了ICU 55.1以及ICU 58.2。 我還更新了gcc和g ++。 當我有正常的Internet連接時,stringi 1.1.3的CRAN存儲庫安裝說明當前未提供一套簡單的說明來成功安裝stringi。

我首先問這個問題,然后找到答案。 無論如何,我都會發布。 我添加了幾個鏈接,但需要刪除它們,因為我沒有足夠的信譽來擺脫它們。

這與ICU無關。 這是stringi中的一個錯誤,我已經在1.1.5版(現在在CRAN中)中對此進行了修復。 dir.exists()函數特定於dir.exists()我沒有意識到。 對造成的不便表示歉意。

字符串庫版本1.1.3(於2017年3月發布)可能存在涉及icudt的問題。 您可以使用以下命令安裝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