going in circles - cli v >=3.6.1 is required and rlang >=1.1.0 is required

I am trying to install the following on a PC (I am a Mac user and this works fine for me normally)
devtools::intsall_local("VisCello.celegans", force=T)
The folder VisCello.celegans is correctly located in the same working directory with the current Rproj
I run:
install.packages("devtools")
followed by devtools::intsall_local("VisCello.celegans", force=T)
I get the error: Error: package or namespace load failed for 'purrr' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace 'cli' 3.6.0 is already loaded, but >= 3.6.1 is required
Error : package 'purrr' could not be loaded
Error: loading failed
Execution halted
ERROR: loading failed

  • removing 'C:/Users/training17/AppData/Local/R/win-library/4.4/VisCello.celegans'
    Warning message:
    In i.p(...) :
    installation of package ‘C:/Users/TRAINI~3/AppData/Local/Temp/RtmpCueQVG/file1c242a515c26/VisCello.celegans_1.1.0.tar.gz’ had non-zero exit status

So I did: install.packages("cli")
Restart R and the run again install.packages("devtools")
followed by devtools::intsall_local("VisCello.celegans", force=T)
(Note: I hace also manually deleted cli and replaced with downloaded cli 3.6.1, I have also tried install.packages ("cli", version = ">=3.6.1")

Now the error is: error in value [3L]: Package 'rlang' version 1.0.6 cannot be unloaded: Error in unloadNamespace(package): namespace 'rlang' is imported by 'ellipsis' so can't be unloaded

So then I install.packages("rlang")
and now I am back to the original error cli: Error in loadNamespace(j <- i[[1L]], c(lib.loc,. .libPaths()), versionCheck = vI[[j]]: namespace 'cli' 3.6.0 is already loaded, but >= 3.6.1 required.

sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_Germany.utf8 LC_CTYPE=English_Germany.utf8
[3] LC_MONETARY=English_Germany.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Germany.utf8

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] rlang_1.1.3

loaded via a namespace (and not attached):
[1] vctrs_0.6.5 cli_3.6.0 stringi_1.8.4 pkgload_1.3.4
[5] promises_1.3.0 shiny_1.8.1.1 xtable_1.8-4 glue_1.7.0
[9] htmltools_0.5.8.1 httpuv_1.6.15 pkgbuild_1.4.4 ellipsis_0.3.2
[13] fastmap_1.2.0 lifecycle_1.0.4 memoise_2.0.1 stringr_1.5.1
[17] compiler_4.4.0 miniUI_0.1.1.1 fs_1.6.4 htmlwidgets_1.6.4
[21] Rcpp_1.0.12 rstudioapi_0.14 later_1.3.2 digest_0.6.35
[25] R6_2.5.1 magrittr_2.0.3 tools_4.4.0 mime_0.12
[29] cachem_1.1.0

I suggest you try pak [1], it behaves much better when updating packages that are loaded. You can install a local package with

pak::local_install()

[1] All about installing pak. — Installing pak • pak

Thanks! I tried a few versions of this which didn't do much
This one:

pak::pak_install("r-lib/cli")

Its gets stuck in an infinity loop (image attached)
I have also tried to update all packages in r (not Rstudio) and this didn't fix anything either.

It seems that something is wrong with your toolchain. But you don't need to install packages from GitHub, you can install binary packages from CRAN, and then no compilers are needed:

pak::pkg_install("cli")

To fix your toolchain, try reinstalling Rtools, the version that matches your R version.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.