Unable to install tidyverse on R Studios

Hi, I am having some issues installing tidyverse on R Studios. I have a chromebook and was able to install R, I am also able to open datasets and use the installed packages. However, when i run the "install.package(tidyverse) an error shows up. I leave below a chunk of the error:

installing to /home/belensosa/R/aarch64-unknown-linux-gnu-library/4.2/00LOCK-haven/00new/haven/libs 
** R 
** inst 
** byte-compile and prepare package for lazy loading 
** help 
*** installing help indices 
*** copying figures 
** building package indices 
** installing vignettes 
** testing if installed package can be loaded from temporary location 
** checking absolute paths in shared objects and dynamic libraries 
** testing if installed package can be loaded from final location 
** testing if installed package keeps a record of temporary installation path 
* DONE (haven) 

* installing *source* package ‘modelr’ ... 
** package ‘modelr’ successfully unpacked and MD5 sums checked 
** using staged installation 
** R 
** data 
*** moving datasets to lazyload DB 
** byte-compile and prepare package for lazy loading 
** help 
*** installing help indices 
*** copying figures 
** building package indices 
** testing if installed package can be loaded from temporary location 
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path 
* DONE (modelr) 

ERROR: dependencies ‘googledrive’, ‘googlesheets4’, ‘httr’, ‘ragg’, ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’ 
* removing ‘/home/belensosa/R/aarch64-unknown-linux-gnu-library/4.2/tidyverse’ 

Warning in install.packages : installation of package ‘tidyverse’ had non-zero exit status 
The downloaded source packages are in ‘/tmp/Rtmpf93yEq/downloaded_packages’

I don't see any error here. It seems it started downloading dependencies.
You might want to install the packages from R and not R-studio because R-studio loads some packages on start for lazy use and it could disrupt the installation.

@JonesYaniv RStudio does not load any packages on startup, so if packages are loaded at startup, they are loaded by R, from .Rprofile, most probably.

@belensosa It seems like you didn't include the part(s) of the output where the packages actually failed to install, most likely the xml2 and/or the ragg package, because these are the ones that require system packages.

Which system packages are needed depends on your Linux distribution. The pak packge (install from ) can tell you what they are, e.g. this is for Ubuntu 22.04:

> pak::pkg_sysreqs("tidyverse")
── Install scripts ───────────────────────────────────────────── Ubuntu 22.04 ──
apt-get -y update
apt-get -y install libcurl4-openssl-dev libssl-dev zlib1g-dev make pandoc \
  libfreetype6-dev libjpeg-dev libpng-dev libtiff-dev libicu-dev \
  libfontconfig1-dev libfribidi-dev libharfbuzz-dev libxml2-dev

── Packages and their system dependencies ──────────────────────────────────────
curl        – libcurl4-openssl-dev, libssl-dev
data.table  – zlib1g-dev
fs          – make
haven       – make, zlib1g-dev
knitr       – pandoc
openssl     – libssl-dev
ragg        – libfreetype6-dev, libjpeg-dev, libpng-dev, libtiff-dev
reprex      – pandoc
rmarkdown   – pandoc
sass        – make
stringi     – libicu-dev
systemfonts – libfontconfig1-dev, libfreetype6-dev
textshaping – libfreetype6-dev, libfribidi-dev, libharfbuzz-dev
xml2        – libxml2-dev

Also, if you use pak to unstall packages, then the system packages are automatically installed, if you use the root user or sudo without a password:

pak::pkg_install("tidyverse")
1 Like

Thanks, I was able to fix it :slight_smile:

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.