I'm trying to install the markdown package from CRAN in my RStudio version "Spotted Wakerobin" that uses R version 4.2.1, but I get the following error:
C:\rtools42\usr\bin\gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c Rbase64.c -o Rbase64.o
/bin/sh: line 1: C:rtools42usrbingcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:253: Rbase64.o] Error 127
ERROR: compilation failed for package 'markdown'
* removing 'C:/Program Files/RPackages/markdown'
Warning in install.packages :
installation of package ‘markdown’ had non-zero exit status
Seems like it can't find something that's supposed to be there, which might be related to the gcc. This is my gcc version info:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/rtools42/x86_64-w64-mingw32.static.posix/bin/../libexec/gcc/x86_64-w64-mingw32.static.posix/10.4.0/lto-wrapper.exe
Target: x86_64-w64-mingw32.static.posix
Configured with: /root/mxe/tmp-gcc-host-x86_64-w64-mingw32.static.posix/gcc-10.4.0/configure --host=x86_64-w64-mingw32.static.posix --target=x86_64-w64-mingw32.static.posix --build=x86_64-pc-linux-gnu --prefix=/usr/lib/mxe/usr/x86_64-w64-mingw32.static.posix --with-native-system-header-dir=/usr/lib/mxe/usr/x86_64-w64-mingw32.static.posix/include --enable-languages=c,c++,objc,fortran --enable-version-specific-runtime-libs --with-gcc --with-gnu-ld --with-gnu-as --disable-nls --without-libiconv-prefix --disable-shared --disable-multilib --without-x --disable-win32-registry --enable-threads=posix --enable-libgomp --with-gmp=/usr/lib/mxe/usr/x86_64-w64-mingw32.static.posix --with-isl=/usr/lib/mxe/usr/x86_64-w64-mingw32.static.posix --with-mpc=/usr/lib/mxe/usr/x86_64-w64-mingw32.static.posix --with-mpfr=/usr/lib/mxe/usr/x86_64-w64-mingw32.static.posix --enable-libstdcxx-time target_configargs=XCFLAGS=-Wno-format
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.4.0 (GCC)
I've already set the following environment variables:
Variable | Value |
---|---|
Path | C:\Program Files\R\R-4.0.5\bin;C:\rtools42\usr\bin; |
BINPREF | C:\rtools42\x86_64-w64-mingw32.static.posix\bin\ |
R_HOME | C:\Program Files\R\R-4.0.5\library\base\R\Rprofile |
R_LIBS_USER | C:\Program Files\RPackages |
R_USER | C:\Program Files\R\R-4.0.5 |
RTOOLS42_HOME | C:\rtools42 |
And I'm wondering what to try next?