package install problem

Hi, could anyone give ideas for my error in installing tidyverse package? I downloaded updates below, already installed R-Tool.
But I still got messages below:

install.packages(c("curl", "purrr", "Rcpp", "rlang", "scales"))
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
......
The downloaded binary packages are in
C:\Users\Patrecia\AppData\Local\Temp\Rtmpovlfyh\downloaded_packages

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘rlang’ 0.4.0 is already loaded, but >= 0.4.1 is required

Thanks!

The warning message is asking you to install Rtools not R-Tool, you can download it from here
https://cran.r-project.org/bin/windows/Rtools/Rtools35.exe

After installing Rtools in your system, try updating the rlang package

install.packages("rlang") 
1 Like

Thanks!
Apparently Ive done both steps, re-do it again, still similar results..

install.packages("rlang")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Patrecia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rlang_0.4.2.zip'
Content type 'application/zip' length 1113577 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\Patrecia\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\Patrecia\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\Patrecia\AppData\Local\Temp\RtmpemuA1p\downloaded_packages

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘rlang’ 0.4.0 is already loaded, but >= 0.4.1 is required

Are you sure you are installing Rtools successfully? Don't you get any error message while installing?
You are not being able to update rlangbecause it needs to be compiled and R is not being able to find the compiler in your system (i.e. Rtools).

Pretty sure. sigh.

  1. re-installed RTools35
  2. updated rlang package.

Results:

install.packages("rlang")
Error in install.packages : Updating loaded packages
install.packages("rlang")
Error in install.packages : Updating loaded packages

Restarting R session...

install.packages("rlang")
Error in install.packages : Updating loaded packages
install.packages("rlang")
Installing package into ‘C:/Users/Patrecia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rlang_0.4.2.zip'
Content type 'application/zip' length 1113577 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\Patrecia\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\Patrecia\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\Patrecia\AppData\Local\Temp\RtmpK0PwtS\downloaded_packages

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘rlang’ 0.4.0 is already loaded, but >= 0.4.1 is required

This is a different issue, try running RStudio as administrator so you have write permissions or manually delete the folder and install again.

1 Like

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