Package ‘XXX’ was installed before R 4.0.0: please re-install it
All packages need to be reinstalled under the new version (4.0). I had to first remove and then reinstall all the packages.
The following worked for me:
# check your package library path
.libPaths()
# grab old packages names
old_packages <- installed.packages(lib.loc = "/Library/Frameworks/R.framework/Versions/3.6/Resources/library")
old_packages <- as.data.frame(old_packages)
list.of.packages <- unlist(old_packages$Package)
# remove old packages
remove.packages( installed.packages( priority = "NA" )[,1] )
# reinstall all packages
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
lapply(list.of.packages,function(x){library(x,character.only=TRUE)})
Package 'xxx’ was installed before R 4.0.0: please re-install it (already done fresh install and checked lib paths)
The error message is maybe a bit confusing, but it's saying the package is already compiled for an earlier version of R. (That's what the option "win.binary" means).
R 4.0 and earlier binaries are not compatible because of updated compilers and build tools.
You'll need to install the package from source, which likely means installing R tools (https://cran.r-project.org/bin/windows/Rtools/) or you'll need to use a version that is pre-built for R 4.0 or later.
MXNet package installation in R
For mxnet
package install in R using this command for only CPU
cran <- getOption("repos")
cran["dmlc"] <- "https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/"
options(repos = cran)
install.packages("mxnet",dependencies = T)
library(mxnet)
Causes of Error: package '_____' was built before 3.0.0: please re-install it in R
Running install.packages("codetools")
can fix this issue for R 3.0.2, if you have the same problem like me:
installing to /home/user/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/libs
** R
** inst
** preparing package for lazy loading
Error : package ‘**codetools**’ was built before R 3.0.0: please re-install it
Error : unable to load R code in package ‘Rcpp’
ERROR: lazy loading failed for package ‘Rcpp’
Related Topics
R: Multiple Linear Regression Model and Prediction Model
Xgboost in R: How Does Xgb.Cv Pass the Optimal Parameters into Xgb.Train
Clustering List for Hclust Function
HTML with Multicolumn Table in Markdown Using Knitr
Understanding Color Scales in Ggplot2
Use of Switch() in R to Replace Vector Values
Creating a Sequential List of Letters with R
How to Make a Heatmap with a Large Matrix
Installing a Package Offline from Github
What Best Practices Do You Use for Programming in R
How to Get Rstudio to Automatically Compile R Markdown Vignettes
Plot a Legend and Well-Spaced Universal Y-Axis and Main Titles in Grid.Arrange
Use Dplyr's Summarise_Each to Return One Row Per Function
How to Add Chapter Bibliographies Using Bookdown