Rlang Error on Rstudio 2020 - Error: package or namespace load failed for ‘...’ in loadNamespace

Error: package or namespace load failed for ‘ggplot2’ in 
loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘rlang’ 0.4.6 is already loaded, but >= 0.4.7 is required

How do I solve this error?I have even tried uninstalling and installing r.

3 Likes

The rlang version is the root problem. The error states that the current version is 0.4.6 but 0.4.7 is required. From the console

install.packages("rlang")

should fix this.

I tried it but I still receive the same message:

update.packages("rlang")
> install.packages("dfidx")
Installing package into ‘C:/Users/41789/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://stat.ethz.ch/CRAN/bin/windows/contrib/4.0/dfidx_0.0-3.zip'
Content type 'application/zip' length 431458 bytes (421 KB)
downloaded 421 KB

package ‘dfidx’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\41789\AppData\Local\Temp\RtmpctPpjL\downloaded_packages
> library(dfidx)
Error: package or namespace load failed for ‘dfidx’ in 
loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘rlang’ 0.4.6 is already loaded, but >= 0.4.7 is required

In a fresh session

library(rlang)
sessionInfo()

Does rlang appear? Which version?

1 Like

Yes. It appears as version 0.4.6

1 Like

Try removing

remove.packages(rlang)

then

install.packages("rlang"

It resolved the issue. Thank you Technocrat

2 Likes

Although I still have the original issue to install the required package, but the type of error seems to be the same. So, I will continue doing the same thing for the new error

library(mlogit)
Loading required package: dfidx
Error: package or namespace load failed for ‘dfidx’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘vctrs’ 0.3.1 is already loaded, but >= 0.3.2 is required
Error: package ‘dfidx’ could not be loaded

1 Like

That's the way to proceed. Come back if you encounter difficulties.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.