Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in loadNamespace: cli >= 2.0.2 is required #2224

Closed
yuhanczhang opened this issue May 9, 2020 · 14 comments
Closed

Error in loadNamespace: cli >= 2.0.2 is required #2224

yuhanczhang opened this issue May 9, 2020 · 14 comments

Comments

@yuhanczhang
Copy link

I was trying to install a library from GitHub in R Studio and I encountered such an error:

> devtools::install_github("haleyjeppson/ggmosaic")
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace ‘cli’ 2.0.0 is already loaded, but >= 2.0.2 is required

I was wondering what this means and how I should solve this problem. Thanks!

@jimhester
Copy link
Member

jimhester commented May 11, 2020

The easiest workaround is running install.packages("cli") before you call the devtools command.

@werrby
Copy link

werrby commented Jul 1, 2021

Hi Jim,

I tried
install.packages("cli")y
if (!require("devtools")) { install.packages("devtools") }
if (!require("datarobot.pe.clustering")) { devtools::install_github("datarobot-community/pe-clustering-R", build_vignettes=TRUE) }

but i'm still getting namespace ‘cli’ 2.2.0 is being loaded, but >= 2.4.0 is required

Thank you

@xiaofanliang
Copy link

install.packages("cli") solves my problem

@alexmorenovi
Copy link

I also had that issue, I had to remove the cli package because it wasn¿t updating correctly, then I re-installed it and everything worked just fine.

@sandramacheri2498
Copy link

In my case I installed the "cli" package but I keep getting the same error. Advice?

@jennybc
Copy link
Member

jennybc commented Dec 9, 2021

@sandramacheri2498 The entry-level advice is to make absolutely 100% sure that, after a confirmed successful re-installation of cli, that you also re-start R, making sure that it's a complete clean restart.

@AnotherDataGuy
Copy link

Just the same issue.
I couldn't manage to update it. I was getting the warning: cannot remove prior installation of package ‘cli’).

So I first removed the package:
remove.packages("cli")

then installed it again:
install.packages("cli")

@KWigg4
Copy link

KWigg4 commented Feb 4, 2022

Thanks so much- uninstalling and reinstalling cli helped me after an hour of swearing :)

@omrctnr
Copy link

omrctnr commented Feb 14, 2022

Just the same issue. I couldn't manage to update it. I was getting the warning: cannot remove prior installation of package ‘cli’).

So I first removed the package: remove.packages("cli")

then installed it again: install.packages("cli")

It worked!
Thank you

@Bakazola99
Copy link

Thank you for this. I think the issue is after installing "cli" try to restart the R. it works well for me with that.

@treyhamilton
Copy link

Hi,

I have everything updated and installed 100% however, I was trying to use this to extract a file that I found and received the following output:

Please wait...
This depends on your internet connection speed and 'size' of content.

Error in str_match(css, el_re) :
lazy-load database '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/stringi/R/stringi.rdb' is corrupt
In addition: Warning messages:
1: In str_match(css, el_re) : restarting interrupted promise evaluation
2: In str_match(css, el_re) : internal error -3 in R_decompress1

@stuwrighthealthecon
Copy link

Just to add in case its useful but uninstalling and re-installing cli didn't work for me but then updating to latest version of RStudio seems to have fixed it

@chinedu2301
Copy link

remove cli and re-install it. That should help. remove.packages("cli") and afterwards install.packages("cli")

@idirdehmous
Copy link

remove cli
reinstall it , if another package is loading it , be sure that you have loaded cli first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests