unable to update packages

Hello, Dears,

I am not able to update my R packages. The following messages are coming frequently as I tried to update or install new packages. I am using the latest version of R and my machine is windows 10.
Suggestions are wellcomed!

install.packages(c("ps", "rlang", "tidyr"))
Installing packages into ‘D:/Users/Sand.his/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

There are binary versions available but the source versions are later:
binary source needs_compilation
ps 1.3.2 1.3.3 TRUE
rlang 0.4.5 0.4.6 TRUE
tidyr 1.0.2 1.0.3 TRUE

installing the source packages ‘ps’, ‘rlang’, ‘tidyr’

trying URL 'https://cran.rstudio.com/src/contrib/ps_1.3.3.tar.gz'
Content type 'application/x-gzip' length 98973 bytes (96 KB)
downloaded 96 KB

trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.6.tar.gz'
Content type 'application/x-gzip' length 835198 bytes (815 KB)
downloaded 815 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyr_1.0.3.tar.gz'
Content type 'application/x-gzip' length 812231 bytes (793 KB)
downloaded 793 KB

  • installing source package 'ps' ...
    ** package 'ps' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs

*** arch - i386
"c:/rtools40/mingw32/bin/"gcc -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -Wall px.c -o px
sh: c:/rtools40/mingw32/bin/gcc: No such file or directory
make: *** [Makevars:11: px] Error 127
ERROR: compilation failed for package 'ps'

  • removing 'D:/Users/amare.wolide/Documents/R/win-library/4.0/ps'
  • restoring previous 'D:/Users/amare.wolide/Documents/R/win-library/4.0/ps'
    Warning in install.packages :
    installation of package ‘ps’ had non-zero exit status
  • installing source package 'rlang' ...
    ** package 'rlang' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs

*** arch - i386
"c:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./lib/ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c capture.c -o capture.o
sh: c:/rtools40/mingw32/bin/gcc: No such file or directory
make: *** [C:/PROGRA~1/R/R-40~1.0/etc/i386/Makeconf:222: capture.o] Error 127
ERROR: compilation failed for package 'rlang'

  • removing 'D:/Users/amare.wolide/Documents/R/win-library/4.0/rlang'
  • restoring previous 'D:/Users/amare.wolide/Documents/R/win-library/4.0/rlang'
    Warning in install.packages :
    installation of package ‘rlang’ had non-zero exit status
  • installing source package 'tidyr' ...
    ** package 'tidyr' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs

*** arch - i386
"c:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I'D:/Users/amare.wolide/Documents/R/win-library/4.0/Rcpp/include' -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
sh: c:/rtools40/mingw32/bin/g++: No such file or directory
make: *** [C:/PROGRA~1/R/R-40~1.0/etc/i386/Makeconf:229: RcppExports.o] Error 127
ERROR: compilation failed for package 'tidyr'

  • removing 'D:/Users/amare.wolide/Documents/R/win-library/4.0/tidyr'
  • restoring previous 'D:/Users/amare.wolide/Documents/R/win-library/4.0/tidyr'
    Warning in install.packages :
    installation of package ‘tidyr’ had non-zero exit status

It seems like you are using the 32 bit R version but you don't have the 32 bit Rtools40 compiler installed or you haven't configured your PATH variable correctly.

I mean following the official Rtools installation instructions from CRAN up to the part of configuring your PATH variable.

https://cran.r-project.org/bin/windows/Rtools/

1 Like

I've had the same trouble as amare (compounded by a Windows 10 update?).

In updating R and RStudio, Rtools doesn't seem to have come up before 4.0. I thought Rtools was concerned with building your own packages.

So, now, here is Rtools40. Do I have to invoke it myself explicitly? Or does update.packages() do all this automatically?

Rtools is not an R package, it is a separate software that you have to install in your system, so update.packages() is going to have no effect on this.

https://cran.r-project.org/bin/windows/Rtools/

So I did the CRAN page about installing Rtools40. And got the example Sys.which() and installing package jsonlite from source OK.

But on Arbor Day, I still get

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’

and, from withing brand-new RStudio I get

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’
update.packages("tidyverse")
library(tidyverse)
Registered S3 methods overwritten by 'broom':
method from
augment.rowwise_df
augment.tbl_df
glance.rowwise_df
glance.tbl_df
tidy.rowwise_df
tidy.tbl_df
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’
update.packages("tidyverse")
library(tidyverse)
Registered S3 methods overwritten by 'broom':
method from
augment.rowwise_df
augment.tbl_df
glance.rowwise_df
glance.tbl_df
tidy.rowwise_df
tidy.tbl_df
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’

Have you tried installing the missing dependency?

install.packages("backports")

When I installed backports (apparently successfully, but unwieldy and wide -- ), but then a subsequent library(tidyverse) groused about "modelr".

After I did install.packages("modelr"), then library(tidyverse) worked, and a pre-April-26 program appeared to run correctly.

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’

install.packages("backports")
Installing package into ‘C:/Users/Owner/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---

There is a binary version available but the source version is later:
binary source needs_compilation
backports 1.1.6 1.1.7 TRUE

installing the source package ‘backports’

trying URL 'https://mirror.las.iastate.edu/CRAN/src/contrib/backports_1.1.7.tar.gz'
Content type 'application/x-gzip' length 17676 bytes (17 KB)
downloaded 17 KB

  • installing source package 'backports' ...
    ** package 'backports' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs

*** arch - i386
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c dotsElt.c -o dotsElt.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c dotsLength.c -o dotsLength.o
"C:/rtools40/mingw32/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
C:/rtools40/mingw32/bin/gcc -shared -s -static-libgcc -o backports.dll tmp.def dotsElt.o dotsLength.o init.o -LC:/PROGRA~1/R/R-40~1.0/bin/i386 -lR
installing to C:/Users/Owner/Documents/R/win-library/4.0/00LOCK-backports/00new/backports/libs/i386

*** arch - x64
"C:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c dotsElt.c -o dotsElt.o
"C:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c dotsLength.c -o dotsLength.o
"C:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
C:/rtools40/mingw64/bin/gcc -shared -s -static-libgcc -o backports.dll tmp.def dotsElt.o dotsLength.o init.o -LC:/PROGRA~1/R/R-40~1.0/bin/x64 -lR
installing to C:/Users/Owner/Documents/R/win-library/4.0/00LOCK-backports/00new/backports/libs/x64
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'backports'
finding HTML links ... done
R_user_dir html
URLencode html
anyNA html
backports-package html
capture.output html
dQuote html
deparse1 html
dir.exists html
dotsElt html
dotsLength html
endsWith html
file.info html
file.size html
get0 html
hasName html
import html
Rd warning: C:/Users/Owner/AppData/Local/Temp/RtmpWA2EN3/R.INSTALLef46c1a7c83/backports/man/import.Rd:47: file link '.onLoad' in package 'base' does not exist and so has been treated as a topic
isFALSE html
isTRUE html
lengths html
list2DF html
startsWith html
strrep html
trimws html
valid.factor html
warningCondition html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path

  • DONE (backports)

The downloaded source packages are in
‘C:\Users\Owner\AppData\Local\Temp\RtmpAhlHXG\downloaded_packages’

library(tidyverse)
Registered S3 methods overwritten by 'broom':
method from
augment.rowwise_df
augment.tbl_df
glance.rowwise_df
glance.tbl_df
tidy.rowwise_df
tidy.tbl_df
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘modelr’

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

Hello, I have exactly the same issue with the package rlang


> install.packages('rlang')
Installing package into ‘C:/Users/timot/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
      binary source needs_compilation
rlang  0.4.5  0.4.6              TRUE

installing the source package ‘rlang’

essai de l'URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.6.tar.gz'
Content type 'application/x-gzip' length 835198 bytes (815 KB)
downloaded 815 KB

* installing *source* package 'rlang' ...
** package 'rlang' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs

*** arch - i386
"c:/rtools40/mingw32/bin/"gcc  -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./lib/         -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c capture.c -o capture.o
sh: c:/rtools40/mingw32/bin/gcc: No such file or directory
make: *** [C:/PROGRA~1/R/R-40~1.0/etc/i386/Makeconf:222: capture.o] Error 127
ERROR: compilation failed for package 'rlang'
* removing 'C:/Users/timot/Documents/R/win-library/4.0/rlang'
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status

@andresrcs what do you mean by configuring your path properly ?

Thanks for your help.

Thanks a lot, it did help and sorry for this newbie question.

Thanks it did help. So now should I remove the previous Rtool 3.5!