Rtools required? error installing packages

Hello everyone.

I am a recent R user. So far I have been able to install packages and upload them with no problem.

Today I have been unsuccessfully trying to install any package. As an example I copied belowed what it shows me. I tried to install "rlang" , rtools40", nothing works.

library(dplyr)
Error: package or namespace load failed for ‘dplyr’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Cátia Nascimento.LAPTOP-S6SKQLC4/Documents/R/win-library/4.0/rlang/R/rlang.rdb': No such file or directory

Hope you can help me.

Thank you

Apparently the package rlang is not (correctly) installed.
I know you said you tried to do this but try again with
install.packages("rlang")

If that does not succeed then which messages do you get?
If you see that rlang is already present in your library folder
then close R and remove it manually from this folder.
The location of the library folder can be found with .libPaths() .
And then install again.

As an aside: I think there is no package called rtools40 .
The toolset rtools40 is only needed when you want to compile packages or R itself from source.

Thank you for your help.

I did as you said (delete manually) and tried to reinstall. It still doesn't work.

library(rlang)
Error: package or namespace load failed for ‘rlang’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Cátia Nascimento.LAPTOP-S6SKQLC4/Documents/R/win-library/4.0/rlang/R/rlang.rdb': No such file or directory

install.packages("rlang")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users//Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_0.4.6.zip'
Content type 'application/zip' length 1109027 bytes (1.1 MB)
downloaded 1.1 MB

package ‘rlang’ successfully unpacked and MD5 sums checked

R is having problems with non-ASCII characters in your windows user name, try installing to the system level package library instead or change your user name

Thank you for your help.

Unfortunately I am trying to change both, unsuccessfully. It is the first time that this happens.

I never had this problem before

What specifically have you tried?

I changed my username in the drive (C:).

I also change the path that R uses as default for downloaded packages. But it keeps saving them in the folder with the non-ASCII characters.

Do you know how I can overcome this?

Thank you so much for your help

Remove rlang from your user library (I would remove all packages from that library) and then install the package this way

install.packages("rlang", lib = "C:\\Program Files\\R\\R-4.0.0\\library")