After updating to R 4.0.0 on my Windows machine, I can't install some packages such as xml2
(the same goes for foreign
and nnet
). When I try to install I get this error message:
* installing *source* package 'foreign' ...
** package 'foreign' 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 R_systat.c -o R_systat.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: R_systat.o] Error 127
ERROR: compilation failed for package 'foreign'
* removing 'C:/R-PKGS/win-library/3.6/foreign'
* restoring previous 'C:/R-PKGS/win-library/3.6/foreign'
Warning in install.packages :
installation of package ‘foreign’ had non-zero exit status
The main reason for installing the xml2
package is that I want to use the tidyverse
package, but when I try to run library(tidyverse)
I get this message:
Error: package or namespace load failed for ‘tidyverse’:
package ‘xml2’ was installed before R 4.0.0: please re-install it
So I guess that I will have to be able to solve the problem that occurs when I try to install the xml2
package as it may occur in the future when other packages will have to be updated.
Kind regards, Andrés
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…