1
Yesterday I updated the R version and used it normal
$version.string
[1] "R version 4.0.2 (2020-06-22)"
This morning, when I went to use, messages appeared that the packages needed to be reinstalled:
> library("tidyverse")
Erro: package or namespace load failed for ‘tidyverse’:
package ‘tidyverse’ was installed before R 4.0.0: please re-install it
Even using
install.packages("tidyverse", dependencies = T)
When I use the library()
, have the same error message. I have tried updating using:
update.packages(checkBuilt = TRUE, ask = FALSE)
But it continues with the same effect. Looking for the path of the library, before appeared this:
> .libPaths()
[1] "/home/usuario/R/x86_64-pc-linux-gnu-library/4.0" "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library" "/usr/lib/R/library"
I tried to change to:
.libPaths(R.home("library"))
and rotate the update
and the install
Packages, but still with the same error.
Now libPaths, that’s all it shows.
> .libPaths()
[1] "/usr/lib/R/library" "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"
Does anyone know what it might be? Linux Mint Usage 19.3.
The folder with version 3.6 Ibraries is still in the same directory.
EDIT -------
I can’t even remove the packages
> .libPaths("/home/usuario/R/x86_64-pc-linux-gnu-library/4.0")
> library("tidyverse")
Erro: package or namespace load failed for ‘tidyverse’:
package ‘tidyverse’ was installed before R 4.0.0: please re-install it
It already excludes R and Rstudio and is still making that mistake. The same thing.
To be honest I don’t quite know why. But try to remove the package before installing it again. use
remove.packages()
– yoyo
I can’t either.
> remove.packages("tidyverse")
Removing package from ‘/home/usuario/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
– RxT
Have you tried to delete the directory with the old version packages and then reinstall?
– Jorge Mendes
@Jorgemendes did it. I removed it manually and still gave error. After a lot of stirring, now little worked. I don’t even know what I did differently.
– RxT
Today the problems of "Error: package ?Matrix' was installed before R 4.0.0: Please re-install it"
– RxT
Try
Rscript -e 'install.packages("tidyverse")'
at the command line.– Rui Barradas