Can't install 'tidyverse' library

Hi!

I'm trying to install the 'tidyverse' library, but when i try, this appears. I'm using Manjaro Linux and the version of RStudio us 2023.03.0.

> install.packages("tidyverse")
Installing package into ‘/home/david/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘systemfonts’, ‘textshaping’, ‘ragg’

probando la URL 'https://cran.rstudio.com/src/contrib/systemfonts_1.0.4.tar.gz'
Content type 'application/x-gzip' length 81757 bytes (79 KB)
==================================================
downloaded 79 KB

probando la URL 'https://cran.rstudio.com/src/contrib/textshaping_0.3.6.tar.gz'
Content type 'application/x-gzip' length 35722 bytes (34 KB)
==================================================
downloaded 34 KB

probando la URL 'https://cran.rstudio.com/src/contrib/ragg_1.2.5.tar.gz'
Content type 'application/x-gzip' length 427859 bytes (417 KB)
==================================================
downloaded 417 KB

probando la URL 'https://cran.rstudio.com/src/contrib/tidyverse_2.0.0.tar.gz'
Content type 'application/x-gzip' length 704618 bytes (688 KB)
==================================================
downloaded 688 KB

* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
Using PKG_LIBS=-lfontconfig -lfreetype
** libs
rm -f systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o unix/FontManagerLinux.o
g++ -std=gnu++11 -I"/usr/include/R/" -DNDEBUG  -I'/home/david/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include' -I/usr/local/include   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -ffat-lto-objects  -c caches.cpp -o caches.o
En el fichero incluido desde caches.h:7,
                 desde caches.cpp:1:
ft_cache.h:9:10: error fatal: ft2build.h: No existe el fichero o el directorio
    9 | #include <ft2build.h>
      |          ^~~~~~~~~~~~
compilación terminada.
make: *** [/usr/lib64/R/etc/Makeconf:178: caches.o] Error 1
ERROR: compilation failed for package ‘systemfonts’
* removing ‘/home/david/R/x86_64-pc-linux-gnu-library/4.2/systemfonts’
Warning in install.packages :
  installation of package ‘systemfonts’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘textshaping’
* removing ‘/home/david/R/x86_64-pc-linux-gnu-library/4.2/textshaping’
Warning in install.packages :
  installation of package ‘textshaping’ had non-zero exit status
ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’
* removing ‘/home/david/R/x86_64-pc-linux-gnu-library/4.2/ragg’
Warning in install.packages :
  installation of package ‘ragg’ had non-zero exit status
ERROR: dependency ‘ragg’ is not available for package ‘tidyverse’
* removing ‘/home/david/R/x86_64-pc-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/Rtmp0EYKtZ/downloaded_packages’

you are having a problem with compiling this package from source.
First thing to check is that you have all the necessary system (i.e. non-R) dependencies :
SystemRequirements: C++11, fontconfig, freetype2
from the particulars of your error ft2build.h wasnt found; and this implies that a lack of freetype2 on your system is the culprit

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