簡體   English   中英

更新到R3.2.1后,包'stringi'不起作用

[英]package 'stringi' does not work after updating to R3.2.1

我看到了這個問題的一個版本 ,但仍然沒有看到答案。 我正在嘗試使用ggplot2但是得到以下錯誤(今天早上使用R3.0.2'frisbee sailing'與RStudio版本0.98.1102一切正常。

我更新了R和Rstudio,現在得到以下內容:

library(ggplot)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
           there is no package called ‘stringi’
            Error: package or namespace load failed for ‘ggplot2’

我很自然地嘗試過:

> install.packages('stringi')

**There is a binary version available but the source version is later:
    binary source needs_compilation
 stringi  0.4-1  0.5-2             FALSE**

 installing the source package ‘stringi’

trying URL 'http://cran.rstudio.com/src/contrib/stringi_0.5-2.tar.gz'
Content type 'application/x-gzip' length 3641292 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /Library/Frameworks/R.framework/Resources
checking for R... /Library/Frameworks/R.framework/Resources/bin/R
checking for R >= 3.1.0... yes
checking for cat... /bin/cat
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: 

command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 150: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 151: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 152: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 153: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 269: make: command not found
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/private/var/folders/bq/3jbmwwh553s395pjg1m9h7fr0000gn/T/Rtmpugc1jZ/R.INSTALLc4677f69ffba/stringi':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status

    The downloaded source packages are in
        ‘/private/var/folders/bq/3jbmwwh553s395pjg1m9h7fr0000gn/T/RtmpXvl7fe/downloaded_packages’

有關如何安裝'stringi'的任何建議? 我對錯誤輸出並不熟悉。 我應該嘗試回到R和Rstudio的舊版本嗎? 最終,我擔心這將成為現在不與更新的R一起使用的軟件包的冰山一角

哦和:

 > sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.7.5 (Lion)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] plyr_1.8.3   tools_3.2.1  gtable_0.1.2 Rcpp_0.11.6  grid_3.2.1  digest_0.6.8 proto_0.3-10

我有同樣的問題。 Marek上面的評論,install.packages正在尋找源而不是二進制文件,因為它更新,對我來說也是正確的。 但他建議使用“選項”系列因某些原因對我不起作用。 然而,這確實有效:

install.packages("stringi",type="mac.binary")

這比通過Xcode安裝編譯器來處理源包容易得多。

您是install.packages.check.source選項的受害者,如果源比二進制文件更新,則會導致R嘗試從源安裝包。 更新包時會發生這種情況(二進制文件在源之后顯示<72)。 這是stringi一個案例(看看你得到的消息: here is a binary version available but the source version is later )。

我設置

options(install.packages.check.source = "no")

在我的.Rprofile文件中,不要擔心install.packages 我需要做的就是等待編譯二進制文件。

我嘗試了install.packages("stringi") ,它導致我的R Studio停止識別我安裝的軟件包。

我通過運行此命令解決了它。 希望能幫助到你:

install.packages("stringi", repos="http://cran.rstudio.com/", dependencies=TRUE)

在Rstudio中運行命令時,當彈出一條消息“ 你想從源代碼中安裝需要編譯的軟件包 ”時,我點擊了“否”並且它有效! 我最初選擇了“是”。 但這對我不起作用。 然后我在這里閱讀一篇文章,找出應該選擇的內容。 選擇“否”后,它有效...

在Windows 8中,R管理員為我解決了問題。

您需要按照以下說明為Xcode安裝命令行工具:

https://support.rstudio.com/hc/en-us/articles/200486498-Package-Development-Prerequisites

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM