I can't install htmltools from GitHub.
library(remotes)
remotes::install_github("rstudio/htmltools")
#> Using github PAT from envvar GITHUB_PAT
#> Downloading GitHub repo rstudio/htmltools@HEAD
#>
#> checking for file ‘/private/var/folders/mk/lh99bg295msg8myvcf5yczkc0000gn/T/RtmpvBkWlO/remotes16ed207d1c1b/rstudio-htmltools-636b95e/DESCRIPTION’ ... ✓ checking for file ‘/private/var/folders/mk/lh99bg295msg8myvcf5yczkc0000gn/T/RtmpvBkWlO/remotes16ed207d1c1b/rstudio-htmltools-636b95e/DESCRIPTION’
#> ─ preparing ‘htmltools’:
#> checking DESCRIPTION meta-information ... ✓ checking DESCRIPTION meta-information
#> ─ cleaning src
#> ─ checking for LF line-endings in source and make files and shell scripts
#> ─ checking for empty or unneeded directories
#> ─ building ‘htmltools_0.5.0.9003.tar.gz’
#>
#>
#> Error: Failed to install 'htmltools' from GitHub:
#> (converted from warning) installation of package '/var/folders/mk/lh99bg295msg8myvcf5yczkc0000gn/T//RtmpvBkWlO/file16edf6c0ea3/htmltools_0.5.0.9003.tar.gz' had non-zero exit status
Created on 2020-11-28 by the reprex package (v0.3.0)
The reprex does not capture what I see on my screen, which is:
I do not think this error is htmltools specific. It appears that I don't have various files like stdlib.h where I should have them. I deleted all my R installations and re-installed, but that did not fix things. For me, the mentioned directory looks like:
I get similar errors when I try to compile other packages.
Any help much appreciated.
sessionInfo()
#> R version 4.0.3 (2020-10-10)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Catalina 10.15.7
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
#> 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
#>
#> loaded via a namespace (and not attached):
#> [1] compiler_4.0.3 magrittr_2.0.1 tools_4.0.3 htmltools_0.5.0
#> [5] yaml_2.2.1 stringi_1.5.3 rmarkdown_2.5 highr_0.8
#> [9] knitr_1.30 stringr_1.4.0 xfun_0.19 digest_0.6.27
#> [13] rlang_0.4.9 evaluate_0.14
Created on 2020-11-28 by the reprex package (v0.3.0)
UPDATE: Problem was that I was using clang4 instead of a current version. This was caused by settings in my Makevars file. Solution:
unlink("~/.R/Makevars")
More information here: R Compiler Tools for Rcpp on macOS | The Coatless Professor