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 loadingSystem has not been booted with systemd as init system (PID 1). Can't operate.Failed to create bus connection: Host is downWarning in system("timedatectl", intern = TRUE) : running command 'timedatectl' had status 1double free or corruption (out)AbortedERROR: 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 statusThe 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 explanationsError: 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 MBERROR: failed to lock directory ‘/home/jannatul/R/x86_64-pc-linux-gnu-library/4.2’ for modifyingTry 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 statusThe downloaded source packages are in‘/tmp/RtmpLoSryc/downloaded_packages’Any suggestions will be highly appreciated! Thank you!