I am a beginner at Ubuntu.I am trying to install RStudio packages in rstudio-serveru on Ubuntu 20.4.5 LTS in WSL-2 (Windows 11). I was having different difficulties in installing RStudio packages and dependencies. I took help from current resources in StackExchange and other communities but couldn't solve it. When I tried to install RStoolbox and lime packages, I got errors:
> ** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to create bus connection: Host is down
Warning in system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 1
double free or corruption (out)
Aborted
ERROR: lazy loading failed for package ‘RStoolbox’
* removing ‘/home/jannatul/R/x86_64-pc-linux-gnu-library/4.2/RStoolbox’
Warning in install.packages :
installation of package ‘RStoolbox’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpgs1b05/downloaded_packages’
I have tried [sudo service rstudio-server start] from your resource 1 but still got another error:
> library(lime) # for local interpretable model-agnostSOC explanations
Error: package or namespace load failed for ‘lime’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘glmnet’
> install.packages("glmnet", repos=c('https://packagemanager.rstudio.com/all/__linux__/focal/latest', 'https://cran.rstudio.com/'))
Installing package into ‘/home/jannatul/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/glmnet_4.1-4.tar.gz'
Content type 'binary/octet-stream' length 11631119 bytes (11.1 MB)
==================================================
downloaded 11.1 MB
ERROR: failed to lock directory ‘/home/jannatul/R/x86_64-pc-linux-gnu-library/4.2’ for modifying
Try removing ‘/home/jannatul/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-glmnet’
Warning in install.packages :
installation of package ‘glmnet’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpLoSryc/downloaded_packages’
Please help! Thank you!