Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to install from the source. #74

Closed
hnguyen19 opened this issue May 12, 2021 · 5 comments
Closed

Fail to install from the source. #74

hnguyen19 opened this issue May 12, 2021 · 5 comments

Comments

@hnguyen19
Copy link

hnguyen19 commented May 12, 2021

R runs and Rstudio runs but does not produce pdf, word, or HTML documents that I knitted. My homebrew, Xcode, and Xquartz are up to date.

`install.packages("systemfonts")

  There is a binary version available but the source
  version is later:
            binary source needs_compilation
systemfonts  1.0.1  1.0.2              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘systemfonts’

trying URL 'https://cran.rstudio.com/src/contrib/systemfonts_1.0.2.tar.gz'
Content type 'application/x-gzip' length 80693 bytes (78 KB)
==================================================
downloaded 78 KB

* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Homebrew 3.1.7
Homebrew/homebrew-core (git revision 20cd7d8e6d; last commit 2021-05-13)
Using PKG_CFLAGS=-I/usr/local/include -I/usr/local/include/freetype2
Using PKG_LIBS=-lfreetype
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the --static freetype2 library. Try installing:
 * deb: libfontconfig1-dev (Debian, Ubuntu, etc)
 * rpm: fontconfig-devel (Fedora, EPEL)
 * csw: fontconfig_dev (Solaris)
 * brew: freetype (OSX)
If --static freetype2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a --static 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: 'ft2build.h' file not found
#include <ft2build.h>
         ^~~~~~~~~~~~
1 error generated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘systemfonts’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/systemfonts’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/systemfonts’
Warning in install.packages :
  installation of package ‘systemfonts’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/_y/gy3_9sj93ws6kj18xhq1fsyr0000gn/T/RtmpBrNubO/downloaded_packages’`

Here is the session info
` sessionInfo(package = NULL)
R version 4.0.4 (2021-02-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] emmeans_1.6.0

loaded via a namespace (and not attached):
 [1] statmod_1.4.36    zoo_1.8-9         tidyselect_1.1.1  xfun_0.22         purrr_0.3.4       splines_4.0.4    
 [7] lattice_0.20-44   vctrs_0.3.8       generics_0.1.0    htmltools_0.5.1.1 yaml_2.2.1        utf8_1.2.1       
[13] survival_3.2-11   rlang_0.4.11      nloptr_1.2.2.2    pillar_1.6.0      glue_1.4.2        DBI_1.1.1        
[19] multcomp_1.4-17   lifecycle_1.0.0   mvtnorm_1.1-1     codetools_0.2-18  coda_0.19-4       evaluate_0.14    
[25] knitr_1.33        fansi_0.4.2       broom_0.7.6       TH.data_1.0-10    Rcpp_1.0.6        xtable_1.8-4     
[31] backports_1.2.1   lme4_1.1-26       digest_0.6.27     bookdown_0.22     dplyr_1.0.6       grid_4.0.4       
[37] tools_4.0.4       sandwich_3.0-0    magrittr_2.0.1    tibble_3.1.1      mice_3.13.0       tidyr_1.1.3      
[43] crayon_1.4.1      pkgconfig_2.0.3   MASS_7.3-54       ellipsis_0.3.2    Matrix_1.3-3      estimability_1.3 
[49] assertthat_0.2.1  minqa_1.2.4       rmarkdown_2.8     R6_2.5.0          boot_1.3-28       nlme_3.1-152     
[55] compiler_4.0.4  ` 
@thomasp85
Copy link
Member

You either need to install the binary version or have the listed system libraries available so it can be compiled from source

@hnguyen19
Copy link
Author

You either need to install the binary version or have the listed system libraries available so it can be compiled from source

Did you mean brew? My homebrew is up-to-date.
`Example usage:
brew search TEXT|/REGEX/
brew info [FORMULA|CASK...]
brew install FORMULA|CASK...
brew update
brew upgrade [FORMULA|CASK...]
brew uninstall FORMULA|CASK...
brew list [FORMULA|CASK...]

  Troubleshooting:
    brew config
    brew doctor
    brew install --verbose --debug FORMULA|CASK
  
  Contributing:
    brew create URL [--no-fetch]
    brew edit [FORMULA|CASK...]
  
  Further help:
    brew commands
    brew help [COMMAND]
    man brew
    https://docs.brew.sh`

@thomasp85
Copy link
Member

No, I mean freetype as per the error message

@hnguyen19
Copy link
Author

@thomasp85 Thanks. Package installed.

@DaviYokogawa
Copy link

DaviYokogawa commented Oct 20, 2023

Hello @hnguyen19, how did you complete this issue?
I have freetype installed via homebrew and it keeps don't work.

Screenshot 2023-10-20 at 10 17 08

Screenshot 2023-10-20 at 10 14 22

Screenshot 2023-10-20 at 10 15 28

Screenshot 2023-10-20 at 10 16 22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants