Try   HackMD

Error occurred while installing tidyverse for R language (kali, Ubuntu)

Author: Junner
Date: 12/17/2024

My R version is 4.4.3.
While installing tidyverse:

install.packages("tidyverse")

It showed this kind of warnings:

removing ‘/home/hubbert/R/x86_64-pc-linux-gnu-library/4.4/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status

See the full messages from here: https://github.com/tidyverse/tidyverse/issues/325#issuecomment-1460704718

Or this messages:

Warning messages:
1: In install.packages("tidyverse") :
installation of package ‘systemfonts’ had non-zero exit status
2: In install.packages("tidyverse") :
installation of package ‘xml2’ had non-zero exit status
3: In install.packages("tidyverse") :
installation of package ‘textshaping’ had non-zero exit status
4: In install.packages("tidyverse") :
installation of package ‘rvest’ had non-zero exit status
5: In install.packages("tidyverse") :
installation of package ‘ragg’ had non-zero exit status
6: In install.packages("tidyverse") :
installation of package ‘tidyverse’ had non-zero exit status

You can run the instructions below to solve the problems, and install tidyverse again:

sudo apt-get install libzmq3-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev build-essential libcurl4-openssl-dev libxml2-dev libssl-dev libfontconfig1-dev

The Refs: