I need to install svglite, but an error comes up saying I need gdtools first, so I try to install gdtools and get the following error:
> install.packages("gdtools", lib="/usr/local/lib/R/3.4/site-library")
trying URL 'https://cran.rstudio.com/src/contrib/gdtools_0.1.4.tar.gz'
Content type 'application/x-gzip' length 33931 bytes (33 KB)
==================================================
downloaded 33 KB
* installing *source* package ‘gdtools’ ...
** package ‘gdtools’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=-I/usr/local/opt/cairo/include/cairo
Using PKG_LIBS=-L/usr/local/opt/cairo/lib -lcairo
** libs
clang++ -I/usr/local/Cellar/r/3.4.1_1/lib/R/include -DNDEBUG -I/usr/local/opt/cairo/include/cairo -I../inst/include/ -I"/usr/local/lib/R/3.4/site-library/Rcpp/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include -fPIC -g -O2 -c CairoContext.cpp -o CairoContext.o
In file included from CairoContext.cpp:7:
/usr/local/opt/cairo/include/cairo/cairo-ft.h:46:10: fatal error: 'ft2build.h' file not found
#include <ft2build.h>
^
1 error generated.
make: *** [CairoContext.o] Error 1
ERROR: compilation failed for package ‘gdtools’
* removing ‘/usr/local/lib/R/3.4/site-library/gdtools’
Warning in install.packages :
installation of package ‘gdtools’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/2c/2dtnf2fs5z7cy45v5gt32n0m0000gn/T/Rtmpj7APMT/downloaded_packages’
Can anyone help me please?