1

I am using Windows.

I just updated R to version 4.0.4. I tried to install tidyverse.

After submitting

install.packages("tidyverse")

A lot of packages were downloaded. During this process, this showed up in my console

  There is a binary version available but the source version is later:
     binary source needs_compilation
utf8  1.1.4  1.2.1              TRUE

Then, much later in the process: installing the source package ‘utf8’

trying URL 'https://cran.rstudio.com/src/contrib/utf8_1.2.1.tar.gz' Content type 'application/x-gzip' length 239463 bytes (233 KB) downloaded 233 KB

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

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

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

I understand very little of this, other than that the package isn't installed and that tidyverse can't be run without it. I.e.

library(tidyverse)

Results in

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 ‘utf8’

How can I fix this?

IRTFM
  • 258,963
  • 21
  • 364
  • 487
Peter Flom
  • 2,008
  • 4
  • 22
  • 35
  • 1
    Looks like you have failed to install Rtools or it's not in a location where R expects to find it. Search SO for `"[r] install rtools windows". It's a common problem for an inexperienced R user, so there must be many prior Q&A's. I was also a bit surprised to see that the target architecture was 386. I thought all versions of R were 64 bit these days, but I'm not a windows user, so my understanding on this point is not terribly well informed. (You might have gotten away with simply saying "N" to the questions "do you want to compile from source?") – IRTFM Mar 21 '21 at 20:14
  • Thanks. I tried to install Rtools and it said that Rtools is not available for my version of R. – Peter Flom Mar 21 '21 at 20:41
  • 1
    Rtools is NOT an R package. Did you do the search I suggested? – IRTFM Mar 21 '21 at 21:09
  • OK, about 600 hits. I will search through them later – Peter Flom Mar 21 '21 at 21:14

1 Answers1

0

I used Google to search and I found this:

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

which worked.

Peter Flom
  • 2,008
  • 4
  • 22
  • 35