Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'stringi' [duplicate]

元气小坏坏 提交于 2019-12-18 04:47:05

问题


When I use

library(Hmisc)

I get the following error

    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'stringi'
    Error: package 'ggplot2' could not be loaded

As well, if I use

library(ggplot2)

I get the following error

    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'

I've tryed to install 'stringi' install.packages("stringi")

But at some point, during the installation, I get the following error message:

    configure: error: in `/private/var/folders/pr/wdr5dvjj24bb4wwnjpg1hndc0000gr/T/RtmpeQ5pXk/R.INSTALL10b94a012cab/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'

I'm using RStudio (Version 0.99.447) and I have R version 3.2.1.


回答1:


I got this error while trying to load the swirl package.

You can try to re install the package directly from cran and include an argument to ensure all the dependant packages are included.

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



回答2:


use this install.packages("package_name", repos=c("http://rstudio.org/_packages", "http://cran.rstudio.com",dependencies=TRUE))

this works as it assigns from where package is to downloaded.



来源:https://stackoverflow.com/questions/30983013/error-in-loadnamespacei-clib-loc-libpaths-versioncheck-vii-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!