Tidyverse no longer loading

I had been using the tidyverse package successfully until just recently. I am now getting this error when I attempt to load the library:

I have tried installing the tibble package and got an error stating:

  • installing source package 'rlang' ...
    ** package 'rlang' successfully unpacked and MD5 sums checked
    ERROR: cannot remove earlier installation, is it in use?

Any ideas of how I could resolve this problem?
Thank you!

Hi @mb7090 and welcome!

You're definitely on the right track with trying to install tibble. Two things I would try:

  • Restart your R session and try install.packages("tibble") again. If you use RStudio, the shortcut is to restart is Ctrl + Shift + F10.
  • If that doesn't work, try restarting RStudio again and first install rlang: install.packages("rlang").

Hope this helps!

I restarted R, and installed tibble. Here are some of the warnings:
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages : cannot remove prior installation of package ‘rlang’
Warning in install.packages : problem copying C:\Users\MB\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\MB\Documents\R\win-library\3.6\rlang\libs\x64\rlang.dll: Permission denied
Warning in install.packages : restored ‘rlang’
package ‘tibble’ successfully unpacked and MD5 sums checked
Warning in install.packages : cannot remove prior installation of package ‘tibble’
Warning in install.packages : problem copying C:\Users\MB\Documents\R\win-library\3.6\00LOCK\tibble\libs\x64\tibble.dll to C:\Users\MB\Documents\R\win-library\3.6\tibble\libs\x64\tibble.dll: Permission denied
Warning in install.packages : restored ‘tibble’
The downloaded binary packages are in C:\Users\MB\AppData\Local\Temp\Rtmp0yUHkW\downloaded_packages

Is it a problem that the packages are in a temp folder?

The tidyverse library didn't load after this so I restarted RStudio and installed rlang. Here's what I got:
Installing package into ‘C:/Users/MB/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rlang_0.4.7.zip'
Content type 'application/zip' length 1150409 bytes (1.1 MB)
downloaded 1.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages : cannot remove prior installation of package ‘rlang’
Warning in install.packages : problem copying C:\Users\MB\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\MB\Documents\R\win-library\3.6\rlang\libs\x64\rlang.dll: Permission denied
Warning in install.packages : restored ‘rlang’
The downloaded binary packages are in C:\Users\MB\AppData\Local\Temp\RtmpMFh1qy\downloaded_packages

Still getting this when I attempt library(tidyverse):
package �tidyverse� was built under R version 3.6.3Registered S3 method overwritten by 'dplyr':
method from
print.rowwise_df
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘tibble’ 2.1.3 is already loaded, but >= 3.0.0 is required

Hmm. It looks to me like you're having trouble installing rlang and tibble because those packages are in use. Are there any other R sessions opened on your machine? If you restart RStudio, what is the result you get when running sessionInfo()? Here's what mine looks like in a fresh R session:

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

loaded via a namespace (and not attached):
[1] compiler_4.0.2 tools_4.0.2 

That was it! I hadn't had an issue with having multiple .Rmd files open and installing packages before, but that must have been the problem because I closed all .Rmd files, restarted RStudio, installed tibble and then the tidyverse library loaded. Now it's loading in my .Rmd files just fine.

Thank you so much for helping me resolve this!

1 Like

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