I am trying to install devtools in RStudio for Linux. My system details are:
-R 4.2.1
-RStudio 2022.07.01
-Linux mint 20.2
Here is the code I used within RStudio:
install.packages("devtools", dependencies = TRUE)
trying URL 'https://cloud.r-project.org/src/contrib/systemfonts_1.0.4.tar.gz'
Content type 'application/x-gzip' length 81757 bytes (79 KB)
==================================================
downloaded 79 KB
trying URL 'https://cloud.r-project.org/src/contrib/textshaping_0.3.6.tar.gz'
Content type 'application/x-gzip' length 35722 bytes (34 KB)
==================================================
downloaded 34 KB
trying URL 'https://cloud.r-project.org/src/contrib/ragg_1.2.2.tar.gz'
Content type 'application/x-gzip' length 424677 bytes (414 KB)
==================================================
downloaded 414 KB
trying URL 'https://cloud.r-project.org/src/contrib/pkgdown_2.0.6.tar.gz'
Content type 'application/x-gzip' length 871371 bytes (850 KB)
==================================================
downloaded 850 KB
trying URL 'https://cloud.r-project.org/src/contrib/devtools_2.4.4.tar.gz'
Content type 'application/x-gzip' length 374492 bytes (365 KB)
==================================================
downloaded 365 KB
begin installing package ‘systemfonts’
make: *** [Makefile:4: systemfonts.ts] Error 1
make: Target 'all' not remade because of errors.
* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfontconfig -lfreetype
** libs
make[1]: Entering directory '/tmp/RtmpVv0dHi/R.INSTALL1c6c443d5d0cc/systemfonts/src'
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/share/R/include" -DNDEBUG -I'/home/brant/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-asoVQd/r-base-4.2.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c caches.cpp -o caches.o
In file included from caches.h:7:0,
from caches.cpp:1:
ft_cache.h:9:22: fatal error: ft2build.h: No such file or directory
compilation terminated.
make[1]: *** [/usr/lib/R/etc/Makeconf:177: caches.o] Error 1
make[1]: Leaving directory '/tmp/RtmpVv0dHi/R.INSTALL1c6c443d5d0cc/systemfonts/src'
ERROR: compilation failed for package ‘systemfonts’
* removing ‘/home/brant/R/x86_64-pc-linux-gnu-library/4.2/systemfonts’
cat: textshaping.out: No such file or directory
cat: ragg.out: No such file or directory
cat: pkgdown.out: No such file or directory
cat: devtools.out: No such file or directory
The downloaded source packages are in
‘/tmp/RtmpYn6Owq/downloaded_packages’
I am not really that proficient in Linux yet so I don't understand why this package is not installing. Any help welcome.
Canuck_afar