Error installing tidytext Linode RStudio Server

I tried to install tidytext for RStudio server to Linode's cloud server with Debian 10. R-base version 3.6. Error message as given:

Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL ''
Content type 'application/x-gzip' length 3022281 bytes (2.9 MB)
downloaded 2.9 MB

* installing *source* package ‘tidytext’ ...
** package ‘tidytext’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
**Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : **
**  object 'vI' not found**
Calls: <Anonymous> ... asNamespace -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘tidytext’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6/tidytext’
Warning in install.packages :
  installation of package ‘tidytext’ had non-zero exit status

I found what caused it. The package "tidytext" was installed in "/usr/local/lib/R/site-library" whilst some packages in "~/R/x86_64-pc-linux-gnu-library/3.6". The error message somehow was misleading. In order to work I add this line ".libPaths(c("~/R/x86_64-pc-linux-gnu-library/3.6","/usr/local/lib/R/site-library"))" to initialise both libraries.

This topic was automatically closed 7 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.