I know there are already quite a few topics on this but none of the solutions in the other threads seems to do the trick for me. I'm relatively new to R so I would really appreciate some help.
Thanks!
Here is my issue:
I recently updated R to 4.0 for Windows 10 (64 bits) and ever since can't load any packages, no matter which ones I choose.
For every package I try to load I get this error:
Fehler: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
kann Datei 'C:/Users/Sebastian Höer/Documents/R/win-library/4.0/rlang/R/rlang.rdb' nicht öffnen: No such file or directory
The folder "4.0" in "win-library" does contain the packages I am trying to load but somehow R seems to be looking for rlang.rdb for every package instead?
I was also getting a warning during installing packages:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
And then any code will just be displayed in the console without execution.
Tried that but even after the successful install, I get the same package or namespace load failed error with every package I try to load, with R still no finding rlang.rdb.
Hi, I am having a similar problem. I have downloaded R Version 4.0 for Windows 10 (64 bits) as well and I get the Error: package or namespace load failed for ‘tidyverse’ in inDL(x, as.logical(local), as.logical(now), ...):unable to load shared object 'C:/Users/mohanlals/Documents/R/win-library/3.6/haven/libs/x64/haven.dll': LoadLibrary failure: The parameter is incorrect.
There aren't any error messages during installation, just the warning to use rtools instead, but packages install fine. Loading the packages on the other hand always results in the same error.
Here is the entire output:
install.packages("ggplot2")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Sebastian Höfer\AppData\Local\Temp\RtmpmYoJ3f\downloaded_packages
library(ggplot2)
Fehler: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
kann Datei 'C:/Users/Sebastian Höfer/Documents/R/win-library/4.0/rlang/R/rlang.rdb' nicht öffnen: No such file or directory
Although it worked fine in previous R versions, is it possible that the special character in the username is causing the issue?
Yes, it is posible, it is know that R has problems with non-ASCII characters and empty spaces on windows user names, try installing to the system level package library instead.
That did the trick, must've been the non-ASCII character.
I had to run Rstudio as administrator, then change the path where packages are installed into like @andresrcs suggested, using .libPaths("C:/Program Files/R/R-4.0.0/userlib") and voila, I am able to load packages again.
Additionally I followed these steps to change the .libPaths permantly.
I have uninstalled version 3.6 and downloaded version 4.0 however I get the same error.
A box comes up that says Rterm.exe - Bad Image
C:\R\R-4.0.0\library\00LOCK-jsonlite\00new\jsonlite\libs\x64\jsonlite.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0x0000045.
This Bad Image message appears anytime I try to download any packages.
Beware, I am an absolute beginner but I have had the same initial problem as you had and also have non-ASCII characters as username. I trie following this thread, but when running .libPaths("C:/Program Files/R/R-4.0.0/userlib") , suddenly I cannot install packages anymore:
Warning in install.packages :
package ‘pylr’ is not available (for R version 4.0.0)
Also, the steps to change the .libPaths permanently didn't work.
Before running .libPaths("C:/Program Files/R/R-4.0.0/userlib"), I couldn't run access the packages through library(), but I could see them in the bottom right corner of RStudio within the packages list.