package installation failed

I am struggling installing tidyverse on my Linux Debian 10 with R 3.6.1. There is an error in the readRDS. Here is the output of the console:

> install.packages("tidyverse")
Installing package into ‘/home/user/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/tidyverse_1.2.1.tar.gz'
Content type 'application/x-gzip' length 61647 bytes (60 KB)
==================================================
  downloaded 60 KB

* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in readRDS(nsInfoFilePath) : error reading from connection
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace -> readRDS
Execution halted
ERROR: lazy loading failed for package ‘tidyverse’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/3.6/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpGVQpvW/downloaded_packages’

Any clue on what's wrong and a solution? I precise that all dependencies were installed successfully.

A look into that post could be helpful: https://forum.posit.co/t/error-in-readrds-rds-file-name-here-error-reading-from-connection/11192

After a desperate search on the web, I ended up on this post on stackoverflow https://stackoverflow.com/questions/6473831/readrdsfile-in-r where the following solution from Larry Hunsicker worked:

"First, change directories to your personal R package directory, then run: find -iname '*rds' -a -size 0

Delete the directories containing any 0 length files in the above list. Then reopen R (or RStudio) and reinstall the deleted packages"

In my case the issue came from lubridate...

2 Likes

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