我正在使用 Windows。
我刚刚将 R 更新到 4.0.4 版。我试图安装 tidyverse。
提交后
install.packages("tidyverse")
下载了很多包。在此过程中,这出现在我的控制台中
There is a binary version available but the source version is later:
binary source needs_compilation
utf8 1.1.4 1.2.1 TRUE
然后,在这个过程的后期:安装源包'utf8'</p>
尝试 URL 'https://cran.rstudio.com/src/contrib/utf8_1.2.1.tar.gz' 内容类型 'application/x-gzip' 长度 239463 字节 (233 KB) 已下载 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’
我对此知之甚少,除了没有安装软件包并且没有它 tidyverse 就无法运行。IE
library(tidyverse)
结果是
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’
我怎样才能解决这个问题?