Install systemfonts with renv failing

I am not able to install the r-package systemfonts into a new project with renv::install()
I was thinking that pulls from the cache but appears to be downloading from a repo.

What is stumping me is that I have this library installed in another project and as a general library and works.

Is there an argument in renv::install to point it to the other project?

What is stumping me is that I have this library installed in another project and as a general library and works.

The only other clue is the path.

library(renv)
#> 
#> Attaching package: 'renv'
#> The following objects are masked from 'package:stats':
#> 
#>     embed, update
#> The following objects are masked from 'package:utils':
#> 
#>     history, upgrade
#> The following objects are masked from 'package:base':
#> 
#>     autoload, load, remove

renv::install("systemfonts")
#> Retrieving 'https://cloud.r-project.org/src/contrib/systemfonts_1.0.4.tar.gz' ...
#>  OK [file is up to date]
#> Installing systemfonts [1.0.4] ...
#>  FAILED
#> Error installing package 'systemfonts':
#> =======================================
#> 
#> * 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
#> Using PKG_CFLAGS=
#> Using PKG_LIBS=-lfontconfig -lfreetype
#> --------------------------- [ANTICONF] --------------------------------
#> Configuration failed to find the fontconfig freetype2 library. Try installing:
#>  * deb: libfontconfig1-dev (Debian, Ubuntu, etc)
#>  * rpm: fontconfig-devel (Fedora, EPEL)
#>  * csw: fontconfig_dev (Solaris)
#>  * brew: freetype (OSX)
#> If fontconfig freetype2 is already installed, check that 'pkg-config' is in your
#> PATH and PKG_CONFIG_PATH contains a fontconfig freetype2.pc file. If pkg-config
#> is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
#> R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
#> -------------------------- [ERROR MESSAGE] ---------------------------
#> <stdin>:1:10: fatal error: fontconfig/fontconfig.h: No such file or directory
#> compilation terminated.
#> --------------------------------------------------------------------
#> ERROR: configuration failed for package ‘systemfonts’
#> * removing ‘/home/kgilds/getReal2223/renv/staging/1/systemfonts’
#> Error: install of package 'systemfonts' failed [error code 1]

Created on 2022-11-09 with reprex v2.0.2

Session info

This may not matter though as I least one test plot rendered fine and seems to finding the font w/plot?

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.