我正在尝试根据https://cran.rstudio.com/bin/windows/Rtools/上的说明安装 rtools40 。我已经设置了 PATH,但是在从 Source 安装 R 包时:
install.packages("jsonlite", type = "source")
它给出了这个错误:
install.packages("jsonlite", type = "source")
probando la URL 'https://cran.rstudio.com/src/contrib/jsonlite_1.7.0.tar.gz'
Content type 'application/x-gzip' length 1057524 bytes (1.0 MB)
downloaded 1.0 MB
* installing *source* package 'jsonlite' ...
** package 'jsonlite' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
"C:/rtools40/usr/bin/mingw32/bin/"gcc -I"C:/R-40~1.2/include" -DNDEBUG -Iyajl/api -D__USE_MINGW_ANSI_STDIO -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
sh: C:/rtools40/usr/bin/mingw32/bin/gcc: No such file or directory
make: *** [C:/R-40~1.2/etc/i386/Makeconf:222: base64.o] Error 127
ERROR: compilation failed for package 'jsonlite'
* removing 'C:/R-4.0.2/library/jsonlite'
* restoring previous 'C:/R-4.0.2/library/jsonlite'
Warning in install.packages :
installation of package ‘jsonlite’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Mauro\AppData\Local\Temp\RtmpqcxD9B\downloaded_packages’
我添加了当前处于活动状态的 PATH 路由: