Error compilando "Caret" en R - "fatal error - cygheap base mismatch detected" - Windows 10 64bits

Hola gente,

Es la primera vez que instalo R, Rstudio y Rtools40. (Todos los instale en su version x64). Desde el principio me empezo a dar este problema asi que busque respuestas en internet pero no pude encontrar ninguna que solucione este problema.
Cuando instale todos los ejecutables desactive el antivirus (Norton) para evitar cualquier problema y los ejecute como administrador.
No soy un usuario experimentado en programacion (Estoy tratando de comenzar un curso el cual no puedo comenzar hasta no lograr que esto funcione).

este es el error que aparece:

The downloaded binary packages are in
C:\Users\fruto\AppData\Local\Temp\Rtmp4CnALJ\downloaded_packages
installing the source package ‘caret’

trying URL ‘https://rweb.crmda.ku.edu/cran/src/contrib/caret_6.0-90.tar.gz
Content type ‘application/x-gzip’ length 2335088 bytes (2.2 MB)
downloaded 2.2 MB

  • installing source package ‘caret’ …
    ** package ‘caret’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs

*** arch - i386
"C:/rtools40/mingw32/bin/“gcc -I"C:/PROGRA~1/R/R-41~1.1/include” -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c caret.c -o caret.o
0 [main] make (440) C:\rtools40\usr\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xDE2408/0xE62408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version should
reside in x:\cygwin\bin, where ‘x’ is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
0 [main] make 1213 dofork: child -1 - forked process 440 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
make: fork: Resource temporarily unavailable
ERROR: compilation failed for package ‘caret’

  • removing ‘C:/Users/fruto/Documents/R/win-library/4.1/caret’
  • restoring previous ‘C:/Users/fruto/Documents/R/win-library/4.1/caret’

The downloaded source packages are in
‘C:\Users\fruto\AppData\Local\Temp\Rtmp4CnALJ\downloaded_packages’
Warning message:
In install.packages(libs_para_instalar) :
installation of package ‘caret’ had non-zero exit status

Ya me fije que haya solo un cygwin1.dll y hay solo uno

Muchas gracias.

También has instalado la versión de 32bits de R y al parecer la versión de 32bits de RTools no está correctamente instalada, si no necesitas usar la versión de 32 bits te recomiendo desinstalarla.

Desinstale todo y lo volvi a instalar sin seleccionar la version 32 bit de R, volvi a instalar R tools version 64 bits (Creo que por default tambien instala la version 32 bit)

el error sigue apareciendo:

  • installing source package ‘jsonlite’ …
    ** package ‘jsonlite’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    "C:/rtools40/mingw64/bin/“gcc -I"C:/PROGRA~1/R/R-41~1.1/include” -DNDEBUG -Iyajl/api -D__USE_MINGW_ANSI_STDIO -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
    0 [main] make (6968) C:\rtools40\usr\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xEE2408/0x1002408.
    This problem is probably due to using incompatible versions of the cygwin DLL.
    Search for cygwin1.dll using the Windows Start->Find/Search facility
    and delete all but the most recent version. The most recent version should
    reside in x:\cygwin\bin, where ‘x’ is the drive on which you have
    installed the cygwin distribution. Rebooting is also suggested if you
    are unable to find another cygwin DLL.
    0 [main] make 995 dofork: child -1 - forked process 6968 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
    make: fork: Resource temporarily unavailable
    ERROR: compilation failed for package ‘jsonlite’
  • removing ‘C:/Program Files/R/R-4.1.1/library/jsonlite’

The downloaded source packages are in
‘C:\Users\fruto\AppData\Local\Temp\RtmpQPuhkE\downloaded_packages’
Warning message:
In install.packages(“jsonlite”, type = “source”) :
installation of package ‘jsonlite’ had non-zero exit status

No se que puede estar pasando.