I am using Windows 10. I was having problems with the newest version of RStudio. I was getting a black screen and also sometimes a blue dot. This caused me to reboot my system.
So I installed the latest version of R and reinstalled RStudio.
I had to reinstall my packages.
I am now trying to use RMarkdown, but I have to install xfun. However, when I try to do that I get the error message
“In install.packages("xfun") : installation of package ‘xfun’ had non-zero exit status”
I cannot install from RGui either. I have RTools on my computer.
I have been using R and RStudio for years and never had these problems. Now I am having many problems. I wonder if I have a registry problem.
I am using R version 4.2.2 (2022-10-31 ucrt) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
RStudio 2022.12.0+353 "Elsbeth Geranium" Release (7d165dcfc1b6d300eb247738db2c7076234f6ef0, 2022-12-03) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2022.12.0+353 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36
** Installing R Package Dependencies for R Markdown: 'markdown', 'xfun'
[1/2] Installing xfun...
Installing package into 'C:/Users/irash/AppData/Local/R/win-library/4.2'
(as 'lib' is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
xfun 0.36 0.37 TRUE
installing the source package 'xfun'
trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.37.tar.gz'
Content type 'application/x-gzip' length 130063 bytes (127 KB)
downloaded 127 KB
- installing source package 'xfun' ...
** package 'xfun' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
sh: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:253: base64.o] Error 127
ERROR: compilation failed for package 'xfun' - removing 'C:/Users/irash/AppData/Local/R/win-library/4.2/xfun'
[2/2] Installing markdown...
The downloaded source packages are in
'C:\Users\irash\AppData\Local\Temp\Rtmpmi0RId\downloaded_packages'
Installing package into 'C:/Users/irash/AppData/Local/R/win-library/4.2'
(as 'lib' is unspecified)
also installing the dependency 'xfun'
There are binary versions available but the source versions are later:
binary source needs_compilation
xfun 0.36 0.37 TRUE
markdown 1.4 1.5 FALSE
installing the source packages 'xfun', 'markdown'
trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.37.tar.gz'
Content type 'application/x-gzip' length 130063 bytes (127 KB)
downloaded 127 KB
trying URL 'https://cran.rstudio.com/src/contrib/markdown_1.5.tar.gz'
Content type 'application/x-gzip' length 41683 bytes (40 KB)
downloaded 40 KB
- installing source package 'xfun' ...
** package 'xfun' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
sh: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:253: base64.o] Error 127
ERROR: compilation failed for package 'xfun' - removing 'C:/Users/irash/AppData/Local/R/win-library/4.2/xfun'
ERROR: dependency 'xfun' is not available for package 'markdown' - removing 'C:/Users/irash/AppData/Local/R/win-library/4.2/markdown'
The downloaded source packages are in
'C:\Users\irash\AppData\Local\Temp\Rtmpmi0RId\downloaded_packages'
Packages successfully installed.
Warning messages:
1: In utils::install.packages("xfun", repos = "https://cran.rstudio.com/") :
installation of package 'xfun' had non-zero exit status
2: In utils::install.packages("markdown", repos = "https://cran.rstudio.com/") :
installation of package 'xfun' had non-zero exit status
3: In utils::install.packages("markdown", repos = "https://cran.rstudio.com/") :
installation of package 'markdown' had non-zero exit status
Here is another problem. I wonder if it is related.
Installing 'ggrepel' ...
Installing package into 'C:/Users/irash/AppData/Local/R/win-library/4.2'
(as 'lib' is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
ggrepel 0.9.2 0.9.3 TRUE
installing the source package 'ggrepel'
trying URL 'https://cran.rstudio.com/src/contrib/ggrepel_0.9.3.tar.gz'
Content type 'application/x-gzip' length 136189 bytes (132 KB)
downloaded 132 KB
- installing source package 'ggrepel' ...
** package 'ggrepel' successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I'C:/Users/irash/AppData/Local/R/win-library/4.2/Rcpp/include' -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
sh: g++: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: RcppExports.o] Error 127
ERROR: compilation failed for package 'ggrepel' - removing 'C:/Users/irash/AppData/Local/R/win-library/4.2/ggrepel'
The downloaded source packages are in
'C:\Users\irash\AppData\Local\Temp\RtmpGQsmOw\downloaded_packages'
Package 'ggrepel' successfully installed.
Warning message:
In utils::install.packages("ggrepel", repos = "https://cran.rstudio.com/") :
installation of package 'ggrepel' had non-zero exit status
Any ideas?