R does not let me install packages - r

I am unable to install packages. I tried installing packages through the "Packages" Tab or writing install.packages("") in the console. However, both ways do not allow me to install the package.
Thank you in advance.
For instance, when I try to install devtools, I write install.packages("devtools") in the console and this is the following result:
your text
> install.packages("devtools")
Installing package into ‘/Users/precisionvaccinesprogram/R/4.2.1/library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘utf8’, ‘askpass’, ‘credentials’, ‘openssl’, ‘sys’, ‘zip’, ‘vctrs’, ‘fastmap’, ‘httpuv’, ‘mime’, ‘fontawesome’, ‘sourcetools’, ‘later’, ‘promises’, ‘base64enc’, ‘sass’, ‘jquerylib’, ‘fansi’, ‘systemfonts’, ‘textshaping’, ‘tinytex’, ‘xfun’, ‘pillar’, ‘highr’(, ‘diffobj’, ‘rematch2’, ‘curl’, ‘gert’, ‘gh’, ‘glue’, ‘jsonlite’, ‘purrr’, ‘rappdirs’, ‘yaml’, ‘cachem’, ‘shiny’, ‘htmltools’, ‘callr’, ‘processx’, ‘bslib’, ‘digest’, ‘downlit’, ‘httr’, ‘ragg’, ‘rmarkdown’, ‘tibble’, ‘xml2’, ‘htmlwidgets’, ‘stringr’, ‘xopen’, ‘commonmark’, ‘knitr’, ‘stringi’, ‘brio’, ‘ps’, ‘waldo’, ‘usethis’, ‘cli’, ‘desc’, ‘ellipsis’, ‘fs’, ‘lifecycle’, ‘memoise’, ‘miniUI’, ‘pkgbuild’, ‘pkgdown’, ‘pkgload’, ‘profvis’, ‘rcmdcheck’, ‘rlang’, ‘roxygen2’, ‘rversions’, ‘sessioninfo’, ‘testthat’, ‘urlchecker’
trying URL 'https://cran.rstudio.com/src/contrib/utf8_1.2.3.tar.gz'
Content type 'application/x-gzip' length 241412 bytes (235 KB)
==================================================
#...(repeats for all the dependencies...I just couldn't paste them because I was over the character limit)...#
* installing *source* package ‘utf8’ ...
** package ‘utf8’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -Iutf8lite/src -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c as_utf8.c -o as_utf8.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [as_utf8.o] Error 127
ERROR: compilation failed for package ‘utf8’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/utf8’
Warning in install.packages :
installation of package ‘utf8’ had non-zero exit status
* installing *source* package ‘sys’ ...
** package ‘sys’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c exec.c -o exec.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [exec.o] Error 127
ERROR: compilation failed for package ‘sys’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/sys’
Warning in install.packages :
installation of package ‘sys’ had non-zero exit status
* installing *source* package ‘zip’ ...
** package ‘zip’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix miniz.c zip.c unixutils.c tools/cmdzip.c -o tools/cmdzip
make: x86_64-apple-darwin13.4.0-clang: No such file or directory
make: *** [tools/cmdzip] Error 1
ERROR: compilation failed for package ‘zip’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/zip’
Warning in install.packages :
installation of package ‘zip’ had non-zero exit status
* installing *source* package ‘fastmap’ ...
** package ‘fastmap’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -Ilib/ -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -DR_NO_REMAP -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c fastmap.cpp -o fastmap.o
/bin/sh: x86_64-apple-darwin13.4.0-clang++: command not found
make: *** [fastmap.o] Error 127
ERROR: compilation failed for package ‘fastmap’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/fastmap’
Warning in install.packages :
installation of package ‘fastmap’ had non-zero exit status
#...(repeats for all the dependencies...I just couldn't paste them because I was over the character limit)...#
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c SpookyV2.cpp -o SpookyV2.o
/bin/sh: x86_64-apple-darwin13.4.0-clang++: command not found
make: *** [SpookyV2.o] Error 127
ERROR: compilation failed for package ‘digest’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/digest’
Warning in install.packages :
installation of package ‘digest’ had non-zero exit status
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/libxml2
Using PKG_LIBS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
* deb: libxml2-dev (Debian, Ubuntu, etc)
* rpm: libxml2-devel (Fedora, CentOS, RHEL)
* csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.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: configuration failed for package ‘xml2’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
* installing *source* package ‘commonmark’ ...
** package ‘commonmark’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
rm -f cmark/cmark.o cmark/node.o cmark/iterator.o cmark/blocks.o cmark/inlines.o cmark/scanners.o cmark/utf8.o cmark/buffer.o cmark/references.o cmark/render.o cmark/man.o cmark/xml.o cmark/html.o cmark/commonmark.o cmark/latex.o cmark/houdini_href_e.o cmark/houdini_html_e.o cmark/houdini_html_u.o cmark/cmark_ctype.o cmark/arena.o cmark/linked_list.o cmark/plugin.o cmark/registry.o cmark/syntax_extension.o cmark/plaintext.o cmark/footnotes.o cmark/map.o extensions/autolink.o extensions/core-extensions.o extensions/ext_scanners.o extensions/strikethrough.o extensions/table.o extensions/tagfilter.o extensions/tasklist.o extensions.o init.o wrapper.o commonmark.dylib cmark/libstatcmark.a
x86_64-apple-darwin13.4.0-clang -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -Icmark -I. -DCMARK_GFM_STATIC_DEFINE -DCMARK_GFM_EXTENSIONS_STATIC_DEFINE -DR_NO_REMAP -DSTRICT_R_HEADERS -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c extensions.c -o extensions.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [extensions.o] Error 127
ERROR: compilation failed for package ‘commonmark’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/commonmark’
Warning in install.packages :
installation of package ‘commonmark’ had non-zero exit status
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** using staged installation
checking for R_HOME... /programs/i386-mac/r/4.2.1/lib/R
checking for R... /programs/i386-mac/r/4.2.1/lib/R/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for cat... /bin/cat
checking for local ICUDT_DIR... icu69/data
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/yj/p3dzzr3j68l4n8jfmx4hx5mh0000gn/T/Rtmp6ihKhm/R.INSTALL1e244bd2be3b/stringi':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/stringi’
Warning in install.packages :
installation of package ‘stringi’ had non-zero exit status
* installing *source* package ‘brio’ ...
** package ‘brio’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c brio.c -o brio.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [brio.o] Error 127
ERROR: compilation failed for package ‘brio’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/brio’
Warning in install.packages :
installation of package ‘brio’ had non-zero exit status
* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/programs/i386-mac/r/4.2.1/lib -L/programs/i386-mac/r/4.2.1/lib -Wall px.c -o px
make: x86_64-apple-darwin13.4.0-clang: No such file or directory
make: *** [px] Error 1
ERROR: compilation failed for package ‘ps’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/ps’
Warning in install.packages :
installation of package ‘ps’ had non-zero exit status
* installing *source* package ‘cli’ ...
** package ‘cli’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -I../inst/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c ansi.c -o ansi.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [ansi.o] Error 127
ERROR: compilation failed for package ‘cli’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/cli’
Warning in install.packages :
installation of package ‘cli’ had non-zero exit status
* installing *source* package ‘fs’ ...
** package ‘fs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang++ -std=gnu++14 -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -I./libuv-1.44.2/include -I. -pthread -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c dir.cc -o dir.o
/bin/sh: x86_64-apple-darwin13.4.0-clang++: command not found
make: *** [dir.o] Error 127
ERROR: compilation failed for package ‘fs’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/fs’
Warning in install.packages :
installation of package ‘fs’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/programs/i386-mac/r/4.2.1/lib/R/include" -DNDEBUG -I./rlang/ -D_FORTIFY_SOURCE=2 -isystem /programs/i386-mac/r/4.2.1/include -mmacosx-version-min=10.9 -I/programs/i386-mac/r/4.2.1/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /programs/i386-mac/r/4.2.1/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/r-base-split_1665472436697/work=/usr/local/src/conda/r-base-4.2.1 -fdebug-prefix-map=/programs/i386-mac/r/4.2.1=/usr/local/src/conda-prefix -c capture.c -o capture.o
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [capture.o] Error 127
ERROR: compilation failed for package ‘rlang’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/rlang’
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
ERROR: dependency ‘sys’ is not available for package ‘askpass’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/askpass’
Warning in install.packages :
installation of package ‘askpass’ had non-zero exit status
ERROR: dependency ‘rlang’ is not available for package ‘later’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/later’
Warning in install.packages :
installation of package ‘later’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘textshaping’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/textshaping’
Warning in install.packages :
installation of package ‘textshaping’ had non-zero exit status
ERROR: dependency ‘xfun’ is not available for package ‘tinytex’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/tinytex’
Warning in install.packages :
installation of package ‘tinytex’ had non-zero exit status
ERROR: dependency ‘xfun’ is not available for package ‘highr’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/highr’
Warning in install.packages :
installation of package ‘highr’ had non-zero exit status
ERROR: dependencies ‘rlang’, ‘fastmap’ are not available for package ‘cachem’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/cachem’
Warning in install.packages :
installation of package ‘cachem’ had non-zero exit status
ERROR: dependency ‘ps’ is not available for package ‘processx’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/processx’
Warning in install.packages :
installation of package ‘processx’ had non-zero exit status
ERROR: dependency ‘cli’ is not available for package ‘desc’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/desc’
Warning in install.packages :
installation of package ‘desc’ had non-zero exit status
ERROR: dependency ‘rlang’ is not available for package ‘ellipsis’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/ellipsis’
Warning in install.packages :
installation of package ‘ellipsis’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘glue’, ‘rlang’ are not available for package ‘lifecycle’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/lifecycle’
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘xml2’ are not available for package ‘rversions’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/rversions’
Warning in install.packages :
installation of package ‘rversions’ had non-zero exit status
ERROR: dependency ‘cli’ is not available for package ‘sessioninfo’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/sessioninfo’
Warning in install.packages :
installation of package ‘sessioninfo’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘curl’, ‘xml2’ are not available for package ‘urlchecker’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/urlchecker’
Warning in install.packages :
installation of package ‘urlchecker’ had non-zero exit status
ERROR: dependency ‘askpass’ is not available for package ‘openssl’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/openssl’
Warning in install.packages :
installation of package ‘openssl’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘glue’, ‘lifecycle’, ‘rlang’ are not available for package ‘vctrs’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
ERROR: dependencies ‘later’, ‘rlang’ are not available for package ‘promises’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/promises’
Warning in install.packages :
installation of package ‘promises’ had non-zero exit status
ERROR: dependencies ‘digest’, ‘base64enc’, ‘rlang’, ‘fastmap’, ‘ellipsis’ are not available for package ‘htmltools’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/htmltools’
Warning in install.packages :
installation of package ‘htmltools’ had non-zero exit status
ERROR: dependency ‘processx’ is not available for package ‘callr’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/callr’
Warning in install.packages :
installation of package ‘callr’ had non-zero exit status
ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/ragg’
Warning in install.packages :
installation of package ‘ragg’ had non-zero exit status
ERROR: dependency ‘processx’ is not available for package ‘xopen’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/xopen’
Warning in install.packages :
installation of package ‘xopen’ had non-zero exit status
ERROR: dependencies ‘highr’, ‘yaml’, ‘xfun’ are not available for package ‘knitr’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/knitr’
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
ERROR: dependencies ‘rlang’, ‘cachem’ are not available for package ‘memoise’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/memoise’
Warning in install.packages :
installation of package ‘memoise’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘desc’, ‘fs’, ‘glue’, ‘rlang’ are not available for package ‘pkgload’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/pkgload’
Warning in install.packages :
installation of package ‘pkgload’ had non-zero exit status
ERROR: dependencies ‘openssl’, ‘sys’, ‘curl’, ‘jsonlite’, ‘askpass’ are not available for package ‘credentials’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/credentials’
Warning in install.packages :
installation of package ‘credentials’ had non-zero exit status
ERROR: dependencies ‘promises’, ‘later’ are not available for package ‘httpuv’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/httpuv’
Warning in install.packages :
installation of package ‘httpuv’ had non-zero exit status
ERROR: dependencies ‘rlang’, ‘htmltools’ are not available for package ‘fontawesome’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/fontawesome’
Warning in install.packages :
installation of package ‘fontawesome’ had non-zero exit status
ERROR: dependencies ‘fs’, ‘rlang’, ‘htmltools’, ‘rappdirs’ are not available for package ‘sass’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/sass’
Warning in install.packages :
installation of package ‘sass’ had non-zero exit status
ERROR: dependency ‘htmltools’ is not available for package ‘jquerylib’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/jquerylib’
Warning in install.packages :
installation of package ‘jquerylib’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘fansi’, ‘glue’, ‘lifecycle’, ‘rlang’, ‘utf8’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/pillar’
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘lifecycle’, ‘rlang’, ‘vctrs’ are not available for package ‘purrr’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/purrr’
Warning in install.packages :
installation of package ‘purrr’ had non-zero exit status
ERROR: dependencies ‘brio’, ‘desc’, ‘digest’, ‘fansi’, ‘memoise’, ‘rlang’, ‘vctrs’, ‘yaml’ are not available for package ‘downlit’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/downlit’
Warning in install.packages :
installation of package ‘downlit’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘jsonlite’, ‘mime’, ‘openssl’ are not available for package ‘httr’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/httr’
Warning in install.packages :
installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘glue’, ‘lifecycle’, ‘rlang’, ‘stringi’, ‘vctrs’ are not available for package ‘stringr’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/stringr’
Warning in install.packages :
installation of package ‘stringr’ had non-zero exit status
ERROR: dependencies ‘callr’, ‘cli’, ‘desc’, ‘processx’ are not available for package ‘pkgbuild’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/pkgbuild’
Warning in install.packages :
installation of package ‘pkgbuild’ had non-zero exit status
ERROR: dependencies ‘askpass’, ‘credentials’, ‘openssl’, ‘sys’, ‘zip’ are not available for package ‘gert’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/gert’
Warning in install.packages :
installation of package ‘gert’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘httr’, ‘jsonlite’ are not available for package ‘gh’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/gh’
Warning in install.packages :
installation of package ‘gh’ had non-zero exit status
ERROR: dependencies ‘htmltools’, ‘jsonlite’, ‘sass’, ‘jquerylib’, ‘rlang’, ‘cachem’, ‘memoise’, ‘base64enc’, ‘mime’ are not available for package ‘bslib’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/bslib’
Warning in install.packages :
installation of package ‘bslib’ had non-zero exit status
ERROR: dependencies ‘fansi’, ‘lifecycle’, ‘pillar’, ‘rlang’, ‘vctrs’ are not available for package ‘tibble’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/tibble’
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
ERROR: dependencies ‘callr’, ‘cli’, ‘curl’, ‘desc’, ‘digest’, ‘pkgbuild’, ‘sessioninfo’, ‘xopen’ are not available for package ‘rcmdcheck’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/rcmdcheck’
Warning in install.packages :
installation of package ‘rcmdcheck’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘commonmark’, ‘desc’, ‘knitr’, ‘pkgload’, ‘purrr’, ‘rlang’, ‘stringi’, ‘stringr’, ‘xml2’ are not available for package ‘roxygen2’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/roxygen2’
Warning in install.packages :
installation of package ‘roxygen2’ had non-zero exit status
ERROR: dependency ‘tibble’ is not available for package ‘rematch2’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/rematch2’
Warning in install.packages :
installation of package ‘rematch2’ had non-zero exit status
ERROR: dependencies ‘httpuv’, ‘mime’, ‘jsonlite’, ‘fontawesome’, ‘htmltools’, ‘sourcetools’, ‘later’, ‘promises’, ‘rlang’, ‘fastmap’, ‘commonmark’, ‘glue’, ‘bslib’, ‘cachem’, ‘ellipsis’, ‘lifecycle’ are not available for package ‘shiny’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/shiny’
Warning in install.packages :
installation of package ‘shiny’ had non-zero exit status
ERROR: dependencies ‘bslib’, ‘htmltools’, ‘jquerylib’, ‘jsonlite’, ‘knitr’, ‘stringr’, ‘tinytex’, ‘xfun’, ‘yaml’ are not available for package ‘rmarkdown’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/rmarkdown’
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘curl’, ‘desc’, ‘fs’, ‘gert’, ‘gh’, ‘glue’, ‘jsonlite’, ‘lifecycle’, ‘purrr’, ‘rappdirs’, ‘rlang’, ‘yaml’ are not available for package ‘usethis’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/usethis’
Warning in install.packages :
installation of package ‘usethis’ had non-zero exit status
ERROR: dependencies ‘htmltools’, ‘jsonlite’, ‘yaml’, ‘knitr’, ‘rmarkdown’ are not available for package ‘htmlwidgets’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/htmlwidgets’
Warning in install.packages :
installation of package ‘htmlwidgets’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘diffobj’, ‘fansi’, ‘glue’, ‘rematch2’, ‘rlang’, ‘tibble’ are not available for package ‘waldo’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/waldo’
Warning in install.packages :
installation of package ‘waldo’ had non-zero exit status
ERROR: dependencies ‘shiny’, ‘htmltools’ are not available for package ‘miniUI’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/miniUI’
Warning in install.packages :
installation of package ‘miniUI’ had non-zero exit status
ERROR: dependencies ‘bslib’, ‘callr’, ‘cli’, ‘desc’, ‘digest’, ‘downlit’, ‘fs’, ‘httr’, ‘jsonlite’, ‘memoise’, ‘purrr’, ‘ragg’, ‘rlang’, ‘rmarkdown’, ‘tibble’, ‘xml2’, ‘yaml’ are not available for package ‘pkgdown’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/pkgdown’
Warning in install.packages :
installation of package ‘pkgdown’ had non-zero exit status
ERROR: dependencies ‘htmlwidgets’, ‘stringr’ are not available for package ‘profvis’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/profvis’
Warning in install.packages :
installation of package ‘profvis’ had non-zero exit status
ERROR: dependencies ‘brio’, ‘callr’, ‘cli’, ‘desc’, ‘digest’, ‘ellipsis’, ‘jsonlite’, ‘lifecycle’, ‘pkgload’, ‘processx’, ‘ps’, ‘rlang’, ‘waldo’ are not available for package ‘testthat’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/testthat’
Warning in install.packages :
installation of package ‘testthat’ had non-zero exit status
ERROR: dependencies ‘usethis’, ‘cli’, ‘desc’, ‘ellipsis’, ‘fs’, ‘lifecycle’, ‘memoise’, ‘miniUI’, ‘pkgbuild’, ‘pkgdown’, ‘pkgload’, ‘profvis’, ‘rcmdcheck’, ‘rlang’, ‘roxygen2’, ‘rversions’, ‘sessioninfo’, ‘testthat’, ‘urlchecker’ are not available for package ‘devtools’
* removing ‘/Users/precisionvaccinesprogram/R/4.2.1/library/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/yj/p3dzzr3j68l4n8jfmx4hx5mh0000gn/T/Rtmpj3YoCc/downloaded_packages’
Warning message:

Related

install package on windows ERROR: compilation failed for packages

> install.packages(c("lubridate", "nlme", "readxl", "sourcetools", "utf8", "xfun"))
Installing packages into ‘C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
There are binary versions available but the source versions are later:
binary source needs_compilation
lubridate 1.9.1 1.9.2 TRUE
nlme 3.1-161 3.1-162 TRUE
readxl 1.4.1 1.4.2 TRUE
sourcetools 0.1.7 0.1.7-1 TRUE
utf8 1.2.2 1.2.3 TRUE
xfun 0.36 0.37 TRUE
installing the source packages ‘lubridate’, ‘nlme’, ‘readxl’, ‘sourcetools’, ‘utf8’, ‘xfun’
trying URL 'https://cran.rstudio.com/src/contrib/lubridate_1.9.2.tar.gz'
Content type 'application/x-gzip' length 427200 bytes (417 KB)
downloaded 417 KB
trying URL 'https://cran.rstudio.com/src/contrib/nlme_3.1-162.tar.gz'
Content type 'application/x-gzip' length 848546 bytes (828 KB)
downloaded 828 KB
trying URL 'https://cran.rstudio.com/src/contrib/readxl_1.4.2.tar.gz'
Content type 'application/x-gzip' length 2091835 bytes (2.0 MB)
downloaded 2.0 MB
trying URL 'https://cran.rstudio.com/src/contrib/sourcetools_0.1.7-1.tar.gz'
Content type 'application/x-gzip' length 24095 bytes (23 KB)
downloaded 23 KB
trying URL 'https://cran.rstudio.com/src/contrib/utf8_1.2.3.tar.gz'
Content type 'application/x-gzip' length 241412 bytes (235 KB)
downloaded 235 KB
trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.37.tar.gz'
Content type 'application/x-gzip' length 130063 bytes (127 KB)
downloaded 127 KB
* installing *source* package 'lubridate' ...
** package 'lubridate' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c datetime.c -o datetime.o
/bin/sh: line 1: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:253: datetime.o] Error 127
ERROR: compilation failed for package 'lubridate'
* removing 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/lubridate'
* restoring previous 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/lubridate'
Warning in install.packages :
installation of package ‘lubridate’ had non-zero exit status
* installing *source* package 'nlme' ...
** package 'nlme' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls -O2 -mfpmath=sse -msse2 -mstackrealign -c chol.f -o chol.o
make: gfortran: No such file or directory
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:277: chol.o] Error 127
ERROR: compilation failed for package 'nlme'
* removing 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/nlme'
* restoring previous 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/nlme'
Warning in install.packages :
installation of package ‘nlme’ had non-zero exit status
* installing *source* package 'readxl' ...
** package 'readxl' successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -Iwindows -I. -D__USE_MINGW_ANSI_STDIO -I'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/cpp11/include' -I'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/progress/include' -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cpp11.cpp -o cpp11.o
/bin/sh: line 1: g++: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: cpp11.o] Error 127
ERROR: compilation failed for package 'readxl'
* removing 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/readxl'
* restoring previous 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/readxl'
Warning in install.packages :
installation of package ‘readxl’ had non-zero exit status
* installing *source* package 'sourcetools' ...
** package 'sourcetools' successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I../inst/include -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c Reader.cpp -o Reader.o
/bin/sh: line 1: g++: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:260: Reader.o] Error 127
ERROR: compilation failed for package 'sourcetools'
* removing 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/sourcetools'
* restoring previous 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/sourcetools'
Warning in install.packages :
installation of package ‘sourcetools’ had non-zero exit status
* installing *source* package 'utf8' ...
** package 'utf8' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -Iutf8lite/src -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c as_utf8.c -o as_utf8.o
/bin/sh: line 1: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:253: as_utf8.o] Error 127
ERROR: compilation failed for package 'utf8'
* removing 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/utf8'
* restoring previous 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/utf8'
Warning in install.packages :
installation of package ‘utf8’ had non-zero exit status
* installing *source* package 'xfun' ...
** package 'xfun' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
/bin/sh: line 1: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:253: base64.o] Error 127
ERROR: compilation failed for package 'xfun'
* removing 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/xfun'
* restoring previous 'C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2/xfun'
Warning in install.packages :
installation of package ‘xfun’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Sachin Dahiya\AppData\Local\Temp\RtmpgBGXsJ\downloaded_packages’
I am using R version 4.2.2 and R tools43 on Windows 11. These packages have been asking for updates for a while now but the compliation fails every time. Please let me know how to fix this issue. I have instaled R tools and R.4.2.2 in C:\Program Files\R.
These are my paths:
> .libPaths()
[1] "C:/Users/Sachin Dahiya/AppData/Local/R/win-library/4.2"
[2] "C:/Program Files/R/R-4.2.2/library"

Error installing Hmisc package in R Studio

I'm new in R and I've been having some issues installing Hmisc package in order to elaborate a Spearman's correlation heatmap. The warning and error are as follows:
18 warnings generated.
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c bilinear.f -o bilinear.o
make: gfortran: No such file or directory
make: *** [bilinear.o] Error 1
ERROR: compilation failed for package ‘interp’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/interp’
Warning in install.packages :
installation of package ‘interp’ had non-zero exit status
* installing *source* package ‘polspline’ ...
** package ‘polspline’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c allpack.f -o allpack.o
make: gfortran: No such file or directory
make: *** [allpack.o] Error 1
ERROR: compilation failed for package ‘polspline’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/polspline’
Warning in install.packages :
installation of package ‘polspline’ had non-zero exit status
* installing *source* package ‘VGAM’ ...
** package ‘VGAM’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c VGAM_init.c -o VGAM_init.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c caqo3.c -o caqo3.o
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c ei.f -o ei.o
make: gfortran: No such file or directory
make: *** [ei.o] Error 1
ERROR: compilation failed for package ‘VGAM’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/VGAM’
Warning in install.packages :
installation of package ‘VGAM’ had non-zero exit status
ERROR: dependency ‘interp’ is not available for package ‘latticeExtra’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/latticeExtra’
Warning in install.packages :
installation of package ‘latticeExtra’ had non-zero exit status
ERROR: dependency ‘latticeExtra’ is not available for package ‘Hmisc’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Hmisc’
Warning in install.packages :
installation of package ‘Hmisc’ had non-zero exit status
ERROR: dependencies ‘Hmisc’, ‘polspline’ are not available for package ‘rms’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rms’
Warning in install.packages :
installation of package ‘rms’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/8b/43x_77fx1p73gb68h2418m5r0000gn/T/RtmpIhACeD/downloaded_packages.
PS. I'm also a Mac user, and I've trying to solve it as some of you guys have suggested in other similar questions,
I've used:
-adding dependencies=true in the script.
-installing tydiverse package
-installing backports

R can't install packages, gcc and g++ fatal error

I haven't been able to install any packages (such as randomForest, devtools, etc.)
I have also updated my R to 4.2 recently (not sure if they are related). I am also running Ubuntu.
I suspect it was something to do with the C++ compiler, such as the g++ and GCC.
things that I have done:
I have edit the Makevars to include:
CC=/usr/bin/gcc
CXX=/usr/bin/g++
FC=/usr/bin/gfortran
F77=/usr/bin/gfortran
Is there anyone facing the same problem? or any hints and guidance are really appreciated. Thank you in advance. If you need more information, please kindly let me know.
One of the errors is (installing devtools):
* installing *source* package ‘sourcetools’ ...
** package ‘sourcetools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/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 Reader.cpp -o Reader.o
g++: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:177: Reader.o] Error 1
ERROR: compilation failed for package ‘sourcetools’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/sourcetools’
Warning in install.packages :
installation of package ‘sourcetools’ had non-zero exit status
* 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
--------------------------- [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/cindy/R/x86_64-pc-linux-gnu-library/4.2/systemfonts’
Warning in install.packages :
installation of package ‘systemfonts’ had non-zero exit status
* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
** using staged installation
> curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","get-libgit2-linux.sh")
>
>
Using static libgit2-1.1.0 for Linux x86_64
Using PKG_CFLAGS=-DSTATIC_LIBGIT2 -I/tmp/RtmpNHz5pp/R.INSTALL48c6b475a68c2/gert/libgit2/include
Using PKG_LIBS=-L/tmp/RtmpNHz5pp/R.INSTALL48c6b475a68c2/gert/libgit2/lib -lgit2 -lrt -lpthread -lssh2 -lssl -lcrypto -ldl -lpcre -lz
Configuration OK!
** libs
rm -f gert.so branch.o clone.o commit.o config.o conflicts.o files.o init.o merge.o rebase.o stash.o submodules.o tag.o utils.o version.o
gcc -I"/usr/share/R/include" -DNDEBUG -DSTATIC_LIBGIT2 -I/tmp/RtmpNHz5pp/R.INSTALL48c6b475a68c2/gert/libgit2/include -DR_NO_REMAP -DSTRICT_R_HEADERS -fvisibility=hidden -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 branch.c -o branch.o
gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: branch.o] Error 1
ERROR: compilation failed for package ‘gert’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/gert’
Warning in install.packages :
installation of package ‘gert’ had non-zero exit status
* installing *source* package ‘commonmark’ ...
** package ‘commonmark’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
rm -f cmark/cmark.o cmark/node.o cmark/iterator.o cmark/blocks.o cmark/inlines.o cmark/scanners.o cmark/utf8.o cmark/buffer.o cmark/references.o cmark/render.o cmark/man.o cmark/xml.o cmark/html.o cmark/commonmark.o cmark/latex.o cmark/houdini_href_e.o cmark/houdini_html_e.o cmark/houdini_html_u.o cmark/cmark_ctype.o cmark/arena.o cmark/html.o cmark/linked_list.o cmark/plugin.o cmark/registry.o cmark/syntax_extension.o cmark/plaintext.o cmark/footnotes.o cmark/map.o extensions/autolink.o extensions/core-extensions.o extensions/ext_scanners.o extensions/strikethrough.o extensions/table.o extensions/tagfilter.o extensions/tasklist.o extensions.o init.o wrapper.o commonmark.so cmark/libstatcmark.a
gcc -I"/usr/share/R/include" -DNDEBUG -Icmark -I. -DCMARK_GFM_STATIC_DEFINE -DCMARK_GFM_EXTENSIONS_STATIC_DEFINE -DR_NO_REMAP -DSTRICT_R_HEADERS -fvisibility=hidden -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 extensions.c -o extensions.o
gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: extensions.o] Error 1
ERROR: compilation failed for package ‘commonmark’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/commonmark’
Warning in install.packages :
installation of package ‘commonmark’ had non-zero exit status
* installing *source* package ‘profvis’ ...
** package ‘profvis’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/share/R/include" -DNDEBUG -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 pause.c -o pause.o
gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: pause.o] Error 1
ERROR: compilation failed for package ‘profvis’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/profvis’
Warning in install.packages :
installation of package ‘profvis’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/share/R/include" -DNDEBUG -I./rlang/ -fvisibility=hidden -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 capture.c -o capture.o
gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: capture.o] Error 1
ERROR: compilation failed for package ‘rlang’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/rlang’
* restoring previous ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/rlang’
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘later’ ...
** package ‘later’ successfully unpacked and MD5 sums checked
** using staged installation
Running configure script
-latomic linker flag needed.
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I'/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/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 RcppExports.cpp -o RcppExports.o
g++: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:177: RcppExports.o] Error 1
ERROR: compilation failed for package ‘later’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/later’
Warning in install.packages :
installation of package ‘later’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘textshaping’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/textshaping’
Warning in install.packages :
installation of package ‘textshaping’ had non-zero exit status
* installing *source* package ‘cachem’ ...
** package ‘cachem’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/share/R/include" -DNDEBUG -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 cache.c -o cache.o
gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: cache.o] Error 1
ERROR: compilation failed for package ‘cachem’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/cachem’
Warning in install.packages :
installation of package ‘cachem’ had non-zero exit status
ERROR: dependency ‘gert’ is not available for package ‘usethis’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/usethis’
Warning in install.packages :
installation of package ‘usethis’ had non-zero exit status
* installing *source* package ‘pkgload’ ...
** package ‘pkgload’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 1.0.2 is being loaded, but >= 1.0.3 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘pkgload’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/pkgload’
* restoring previous ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/pkgload’
Warning in install.packages :
installation of package ‘pkgload’ had non-zero exit status
ERROR: dependency ‘later’ is not available for package ‘promises’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/promises’
Warning in install.packages :
installation of package ‘promises’ had non-zero exit status
ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/ragg’
Warning in install.packages :
installation of package ‘ragg’ had non-zero exit status
ERROR: dependency ‘cachem’ is not available for package ‘memoise’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/memoise’
Warning in install.packages :
installation of package ‘memoise’ had non-zero exit status
ERROR: dependency ‘commonmark’ is not available for package ‘roxygen2’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/roxygen2’
Warning in install.packages :
installation of package ‘roxygen2’ had non-zero exit status
ERROR: dependencies ‘promises’, ‘later’ are not available for package ‘httpuv’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/httpuv’
Warning in install.packages :
installation of package ‘httpuv’ had non-zero exit status
ERROR: dependency ‘memoise’ is not available for package ‘downlit’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/downlit’
Warning in install.packages :
installation of package ‘downlit’ had non-zero exit status
ERROR: dependencies ‘httpuv’, ‘sourcetools’, ‘later’, ‘promises’, ‘commonmark’, ‘cachem’ are not available for package ‘shiny’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/shiny’
Warning in install.packages :
installation of package ‘shiny’ had non-zero exit status
ERROR: dependencies ‘downlit’, ‘memoise’, ‘ragg’ are not available for package ‘pkgdown’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/pkgdown’
Warning in install.packages :
installation of package ‘pkgdown’ had non-zero exit status
ERROR: dependency ‘shiny’ is not available for package ‘miniUI’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/miniUI’
Warning in install.packages :
installation of package ‘miniUI’ had non-zero exit status
ERROR: dependencies ‘usethis’, ‘memoise’, ‘miniUI’, ‘pkgdown’, ‘profvis’, ‘roxygen2’ are not available for package ‘devtools’
* removing ‘/home/cindy/R/x86_64-pc-linux-gnu-library/4.2/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpITL0q0/downloaded_packages’

Error when installing package "plotly" in R

When I tried to install the package "plotly", it returned the following error message:
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c assign.c -o assign.o
clang: error: unsupported option '-fopenmp'
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/data.table’
Warning in install.packages :
installation of package ‘data.table’ had non-zero exit status
ERROR: dependency ‘data.table’ is not available for package ‘plotly’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/plotly’
Warning in install.packages :
installation of package ‘plotly’ had non-zero exit status
After some quick search this seems to be due to an incompatibility with MacOS High Sierra? I was able to install other packages like 'ggplot2' though. I'm very new to R and would really appreciate any help!
The non-zero exit status simply indicates that there was an error during the installation of the "package".
File link : https://cran.r-project.org/src/contrib/plotly_4.8.0.tar.gz
Try with the following command:
install.packages('FILE_PATH', repos=NULL, type = "source",dependencies = TRUE)
Doing so, all the dependencies for the package will also be downloaded. Downloading from source will recompile the package and installs.

semPlot package dependency issues

I am trying to use the package semPlot with R version 3.2.3 on Linux Mint. Is the only solution to downgrade my R-version? I have installed package XML without errors. UPDATE BELOW
ran: install.packages("semPlot",dependencies=T) errors:
....
g++ -I/usr/share/R/include -DNDEBUG -I"/home/king/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c minqa.cpp -o minqa.o
/bin/bash: g++: command not found
make: *** [minqa.o] Error 127
ERROR: compilation failed for package ‘minqa’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/minqa’
Warning in install.packages :
installation of package ‘minqa’ had non-zero exit status
* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/tmp/Rtmpw7bRnY/R.INSTALL5fd12b68373/nloptr':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘nloptr’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
* installing *source* package ‘RcppEigen’ ...
** package ‘RcppEigen’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/king/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I../inst/include -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppEigen.cpp -o RcppEigen.o
/bin/bash: g++: command not found
make: *** [RcppEigen.o] Error 127
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/RcppEigen’
Warning in install.packages :
installation of package ‘RcppEigen’ had non-zero exit status
ERROR: dependencies ‘minqa’, ‘nloptr’, ‘RcppEigen’ are not available for package ‘lme4’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/lme4’
Warning in install.packages :
installation of package ‘lme4’ had non-zero exit status
ERROR: dependency ‘lme4’ is not available for package ‘arm’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/arm’
Warning in install.packages :
installation of package ‘arm’ had non-zero exit status
ERROR: dependency ‘lme4’ is not available for package ‘rockchalk’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/rockchalk’
Warning in install.packages :
installation of package ‘rockchalk’ had non-zero exit status
ERROR: dependency ‘arm’ is not available for package ‘mi’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/mi’
Warning in install.packages :
installation of package ‘mi’ had non-zero exit status
ERROR: dependency ‘mi’ is not available for package ‘sem’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/sem’
Warning in install.packages :
installation of package ‘sem’ had non-zero exit status
ERROR: dependency ‘sem’ is not available for package ‘qgraph’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/qgraph’
Warning in install.packages :
installation of package ‘qgraph’ had non-zero exit status
ERROR: dependencies ‘qgraph’, ‘sem’, ‘rockchalk’ are not available for package ‘semPlot’
* removing ‘/home/king/R/x86_64-pc-linux-gnu-library/3.2/semPlot’
Warning in install.packages :
installation of package ‘semPlot’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpW1PZ2x/downloaded_packages’
UPDATE
Based on the comments I discovered I had to install:
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install build-essential
I am now getting:
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
Thanks again to the comments I discovered I had to install:
sudo apt-get install liblapack-dev
which finally fixed my issues and I was able to install the package

Resources