Error: Cannot run anything!

Hi, i've been trying to install a package called "kuenm", but I can't:

if(!require(kuenm)){
devtools::install_github("marlonecobos/kuenm")
}

Error in get(Info[i, 1], envir = env) :
não foi possível abrir o arquivo 'C:/Users/Usuário/Documents/R/win-library/4.0/crayon/R/crayon.rdb': No such file or directory

or

install.packages("kuenm")

install.packages("kuenm")
Installing package into ‘C:/Users/Usuário/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘kuenm’ is not available (for R version 4.0.0)

I can't even load some packages needed for this:

library(devtools)
Carregando pacotes exigidos: usethis
Error: package or namespace load failed for ‘usethis’ in get(Info[i, 1], envir = env):
não foi possível abrir o arquivo 'C:/Users/Usuário/Documents/R/win-library/4.0/fs/R/fs.rdb': No such file or directory
Erro: package ‘usethis’ could not be loaded

and don't ask me about reprex either:

library(reprex)
Erro: package or namespace load failed for ‘reprex’ in get(Info[i, 1], envir = env):
não foi possível abrir o arquivo 'C:/Users/Usuário/Documents/R/win-library/4.0/fs/R/fs.rdb': No such file or directory

I think is something related to windows permision, but I really don't know what's going on.

R has problems with non-ASCII characters in your windows user name, you have to either change your username or install into the system level package library instead of the user level one.

I've deleted everything and re-install direct into the C:, but still cannot run devtools.

library(devtools)
Carregando pacotes exigidos: usethis
Error: package or namespace load failed for ‘usethis’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘rlang’
Erro: package ‘usethis’ could not be loaded

What happens if you try to install the missing dependency?

install.packages("rlang")

install.packages("rlang")

There is a binary version available but the source version is later:
binary source needs_compilation
rlang 0.4.5 0.4.6 TRUE

installing the source package ‘rlang’

tentando a URL 'http://cran.rstudio.com/src/contrib/rlang_0.4.6.tar.gz'
Content type 'application/x-gzip' length 835198 bytes (815 KB)
downloaded 815 KB

  • installing source package 'rlang' ...
    ** package 'rlang' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs

*** arch - i386
"c:/rtools40/mingw32/bin/"gcc -I"C:/R/R-40~1.0/include" -DNDEBUG -I./lib/ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c capture.c -o capture.o
sh: c:/rtools40/mingw32/bin/gcc: No such file or directory
make: *** [C:/R/R-40~1.0/etc/i386/Makeconf:222: capture.o] Error 127
ERROR: compilation failed for package 'rlang'

  • removing 'C:/R/R-4.0.0/library/rlang'
    Warning in install.packages :
    installation of package ‘rlang’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Usuário\AppData\Local\Temp\RtmpeeOrX9\downloaded_packages’

I've did everything again, but only have installed the 64 version, and gotch the exactly same error that I previously posted.

Sorry, have no realized that. Here after re-installed:

install.packages("rlang")
Installing package into ‘C:/Users/Usuário/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
rlang 0.4.5 0.4.6 TRUE

installing the source package ‘rlang’

tentando a URL 'http://cran.rstudio.com/src/contrib/rlang_0.4.6.tar.gz'
Content type 'application/x-gzip' length 835198 bytes (815 KB)
downloaded 815 KB

  • installing source package 'rlang' ...
    ** package 'rlang' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    "c:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./lib/ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c capture.c -o capture.o
    sh: c:/rtools40/mingw64/bin/gcc: No such file or directory
    make: *** [C:/PROGRA~1/R/R-40~1.0/etc/x64/Makeconf:222: capture.o] Error 127
    ERROR: compilation failed for package 'rlang'
  • removing 'C:/Users/Usuário/Documents/R/win-library/4.0/rlang'
    Warning in install.packages :
    installation of package ‘rlang’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Usuário\AppData\Local\Temp\RtmpQTbfoX\downloaded_packages’

You are still installing packages into your user level package library, as I said R has problems with the non-ASCII character in your windows user name, either change your username or install into the system level package library.

I've done again. Now this happen:

install.packages("rlang")
Installing package into ‘C:/R-4.0.0/library’
(as ‘lib’ is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
rlang 0.4.5 0.4.6 TRUE

installing the source package ‘rlang’

tentando a URL 'http://cran.rstudio.com/src/contrib/rlang_0.4.6.tar.gz'
Content type 'application/x-gzip' length 835198 bytes (815 KB)
downloaded 815 KB

  • installing source package 'rlang' ...
    ** package 'rlang' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    "c:/rtools40/mingw64/bin/"gcc -I"C:/R-40~1.0/include" -DNDEBUG -I./lib/ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c capture.c -o capture.o
    sh: c:/rtools40/mingw64/bin/gcc: No such file or directory
    make: *** [C:/R-40~1.0/etc/x64/Makeconf:222: capture.o] Error 127
    ERROR: compilation failed for package 'rlang'
  • removing 'C:/R-4.0.0/library/rlang'
    Warning in install.packages :
    installation of package ‘rlang’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Usuário\AppData\Local\Temp\Rtmp8QbGqq\downloaded_packages’

I think that the old library is crossing with the new one because I didn't delete?

I can not reproduce your issue, the only thing that comes to my mind is that you have a corrupted Rtools installation, I would try reinstalling Rtools, restarting the R session and installing the package again.

Hey, so i've been trying different things to make this work. A friend of mine suggested to install and run R on Jupyter notebook. I did and for now it's workin'. Don't know why or what it's goin on my pc.

But anyway, thanks for the help. :slight_smile:

I have had the same problem with a different package as soon as I installed R 4.0 (the 64-bit version only)

I have no non-standard characters anywhere in the path and I have reinstalled rtools but I still get the same problem:


install.packages("showtext","C:/Program Files/R/R-4.0.0")

There is a binary version available but the source version is later:
binary source needs_compilation
showtext 0.7-1 0.8 TRUE

installing the source package ‘showtext’

trying URL ' the URL'
Content type 'application/x-gzip' length 378224 bytes (369 KB)
downloaded 369 KB

tar xzf sysfonts-dep-win-biarch.tar.gz
"c:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./include -I./include/freetype -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c array.c -o array.o
sh: c:/rtools40/mingw64/bin/gcc: No such file or directory
make: *** [C:/PROGRA~1/R/R-40~1.0/etc/x64/Makeconf:222: array.o] Error 127
ERROR: compilation failed for package 'showtext'

  • removing 'C:/Program Files/R/R-4.0.0/showtext'
    Warning in install.packages :
    installation of package ‘showtext’ had non-zero exit status

From the looks of it, it cannot find the Rtools40 directory -- probably because it does not exist. The mingw_64 is in Rtools, not Rtools40 (i tried to post the screenshot, but it won't let me). Reinstalling rtools has not changed that, so I am not sure why the installation script is asking for Rtools40. What am I doing wrong?

I'll appreciate any help with this. It's not the only issue that has popped up since I've updated R: knitr had to be reinstalled separately even though it was not showing as "old", but I am tackling this one problem at a time. Thanks!

Have you followed the installation instructions from CRAN? after installing RTools40 (This is required for R 4.0.0) you have to set your PATH variable for R being able to find it, otherwise, it's going to use your previous RTools installation (RTools35).

https://cran.r-project.org/bin/windows/Rtools/

1 Like

Installing Rtools40 fixed the problem. Thank you for your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

It seems you also have the 32 bit version of R but you haven't installed the 32 bit compiler of Rtools40. I would recommend not installing the 32 bit version if it not strictly needed.

That doesn't seems right, if it is exactly the same then you still have the 32 bit version installed.