Hi - hoping someone can help with an error that I'm getting when I try to load the 'readr' package. The error message I'm getting looks like this:
library('readr')
Error: package or namespace load failed for ‘readr’:
.onLoad failed in loadNamespace() for 'readr', details:
call: loadNamespace(name)
error: object 'pkgInfo' not found
In addition: Warning messages:
1: package ‘readr’ was built under R version 4.0.5
2: In loadNamespace(name) : package ‘tzdb’ has no 'package.rds' in Meta/
Error: package or namespace load failed for ‘readr’:
.onLoad failed in loadNamespace() for 'readr', details:
call: loadNamespace(name)
error: object 'pkgInfo' not found
In addition: Warning messages:
1: package ‘readr’ was built under R version 4.0.5
2: In loadNamespace(name) : package ‘tzdb’ has no 'package.rds' in Meta/
remove.packages("tzdb")
Removing package from ‘C:/Users//OneDrive - WBG/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in remove.packages :
cannot delete reparse point 'C:/Users//OneDrive - WBG/Documents/R/win-library/4.0/tzdb/Meta', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Restarting R session...
> install.packages("tzdb")
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//OneDrive - WBG/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tzdb_0.2.0.zip'
Content type 'application/zip' length 1445229 bytes (1.4 MB)
downloaded 1.4 MB
package ‘tzdb’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot delete reparse point 'C:\Users\\OneDrive - WBG\Documents\R\win-library\4.0/tzdb/Meta', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
cannot remove prior installation of package ‘tzdb’
Warning in install.packages :
cannot delete reparse point 'C:\Users\\OneDrive - WBG\Documents\R\win-library\4.0/tzdb/Meta', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
restored ‘tzdb’
The downloaded binary packages are in
C:\Users\\AppData\Local\Temp\Rtmps3FkbQ\downloaded_packages
Maybe you can force one drive to stop syncing temporarily, and delete it that way?
In general, if you are able to do so then I would recommend moving your R package library off of OneDrive and onto your computer's local storage, I think this will save you a lot of headache in the end if you use R a lot.
Within the last 24 hours (but not before) I also received errors relating to readr , for me it was crashing deployment of my Shiny app. Specifically it was at this step
building: Building package: readr
which did not occur before. I uninstall/re-installed it but no luck. The only success I had was to uninstall the version of R I was using, delete the old readr library (and I also removed several others) - then upgraded to R 4.1.2 and do a fresh install.packages("readr")
A new version of readr just went to CRAN and the binaries haven't all been built yet, so your computer was trying to install it from source (which is sometimes harder / more prone to issues). It is possible the 4.1.2 binary was built, but the one for your older version of R wasn't, so that may be why updating helped. In a few days CRAN should have all of the binaries built so this won't be an issue anymore.