Pillar refuses to update?

Session info first, I suppose

Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           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.3    cli_3.2.0         tools_4.0.3       sessioninfo_1.2.2

Now the error message I keep getting.

> install.packages("pillar")
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/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
also installing the dependencies ‘cli’, ‘lifecycle’, ‘rlang’, ‘vctrs’


  There are binary versions available but the source versions are later:
          binary source needs_compilation
cli        3.2.0  3.6.2              TRUE
lifecycle  1.0.1  1.0.4             FALSE
rlang      1.0.2  1.1.3              TRUE
vctrs      0.4.1  0.6.5              TRUE
pillar     1.7.0  1.9.0             FALSE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/cli_3.2.0.zip'
Content type 'application/zip' length 1255499 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_1.0.2.zip'
Content type 'application/zip' length 1718546 bytes (1.6 MB)
downloaded 1.6 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/vctrs_0.4.1.zip'
Content type 'application/zip' length 1569486 bytes (1.5 MB)
downloaded 1.5 MB

package ‘cli’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Daniel\AppData\Local\Temp\Rtmpiin6Fa\downloaded_packages
installing the source packages ‘lifecycle’, ‘pillar’

trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.4.tar.gz'
Content type 'application/x-gzip' length 107656 bytes (105 KB)
downloaded 105 KB

trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.9.0.tar.gz'
Content type 'application/x-gzip' length 444528 bytes (434 KB)
downloaded 434 KB

* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 1.0.2 is being loaded, but >= 1.1.0 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/Documents/R/win-library/4.0/lifecycle'
* restoring previous 'C:/Users/Documents/R/win-library/4.0/lifecycle'
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'pillar' ...
** package 'pillar' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Warning: replacing previous import 'lifecycle::last_warnings' by 'rlang::last_warnings' when loading 'pillar'
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'vctrs' 0.4.1 is being loaded, but >= 0.5.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'pillar'
* removing 'C:/Users/Documents/R/win-library/4.0/pillar'
* restoring previous 'C:/Users/Documents/R/win-library/4.0/pillar'
Warning in install.packages :
  installation of package ‘pillar’ had non-zero exit status

Finally, and this may be unrelated, but lately RStudio seems to get stuck in a sort of boot loop. I can see a crash report as part of the block of RStudio processes when I use the Task Manager, but the program never actually delivers that crash report to me, so I have no idea what's going on there.

Regarding the RStudio boot loop, you might want to try resetting its state as documented at https://support.posit.co/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State.

As for updating pillar, updating it requires updates to several other packages (listed in the binary/source/needs_compilation table). The installer cannot compile source code (more on that in a second), so it is installing somewhat out-of-date binary versions, which do not meet the requirements for the updated version of pillar. So the pillar update fails.

To fix this, you need to enable compilation of source packages, which means you need Rtools. The output seems to say that Rtools is being installed, but then it says it will only install binaries, implying that Rtools is unavailable.

I would suggest the following:

  1. Fix RStudio so that you can install from there if at all possible.

  2. Consider updating R to the current version (not required, but recommended).

  3. Install Rtools, which is a system package and not an R library, as described in the answer here. Rather than version 4.2.2, use the version that matches your R version.

  4. Restart R and/or RStudio and (per step 4 in the answer) make sure your system can find Rtools. You may need to tweak your system path.

  5. Once the system can find Rtools, retry upgrading pillar.

1 Like

First, I suggest you set up P3M (Posit Package Manager) if you can, so you don't need to build packages from source, even on older R versions. I.e. set

options(repos = "https://packagemanager.posit.co/cran/latest")

Then, I suggest you use pak if you can, it'll try to install binary packages whenever it can, and it also automatically unloads the packages that need updates, which should solve the error you are getting. See this for installing pak, you don't need Rtools for this: All about installing pak. — Installing pak • pak

If you cannot use pak, then install Rtools, make sure you close all R sessions., and then open a new R session, check that you don't have any contributed packages loaded, and install rlang and pillar:

install.packages(c("rlang", "pillar"), type = "source")

You might need to install Rtools, even if you use pak and/or P3M, if for some reason P3M does not have package binaries for some package you need. This happens very rarely.

1 Like

Finally got all of the pieces to work together to update pillar along with the binaries/dependencies.

Thanks for your help @prubin

1 Like

This topic was automatically closed 42 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.