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

2

17

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.

Spirituous answered 22/6, 2015 at 14:48 Comment(7)
It might help if you provided the output from sessionInfo().Stochmal
apt-get install build-essential | yum install gcc | [download Xcode + run it once to accept license] xcode-select --install (OS X)Teniacide
@hrbrmstr, out of curiosity, how can you tell that the OP is using OS X and not another flavor of *nix? Are the file paths OS X specific?Alpine
@RichardErickson I cannot. Hence providing Debian/Ubuntu | RedHat/CentOS | OS X solutions depending on OP's setup.Teniacide
@hrbrmstr, okay. I understand your comment now. Thanks for answering my question. I agree that OS is needed to provide an answer to the OP's question.Alpine
ARGH! @RichardErickson, the OP is using OS X. The /Library/Frameworks/R.framework/ gives that away. Marta: Grab Xcode from the Mac App Store and use that xcode-select --install to download the command line tools. You may need a (free) developer account.Teniacide
I think this is exacly the same case as in https://mcmap.net/q/549172/-package-39-stringi-39-does-not-work-after-updating-to-r3-2-1/168747. R tries to install package from sources cause source is newer than binary (0.5-2 vs 0.4-1). Set options(install.packages.check.source = "no") and then install.packages("stringi"). (IMPORTANT: it's related to new releases of package, now everything should be ok)Padraic
P
18

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)
Prevent answered 25/7, 2015 at 20:52 Comment(0)
M
4

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 to download the package.

Miscreated answered 18/3, 2017 at 18:24 Comment(2)
While you may have solved this user's problem, code-only answers are not very helpful to users who come to this question in the future. Please edit your answer to explain why your code solves the original problem.Corvine
Use this: `install.packages("package name", dependencies = TRUE)'Polyzoic

© 2022 - 2024 — McMap. All rights reserved.