R (Mac): installation of `cluster` package is failing - r

I am trying to set up R on a Mac and the installation of the cluster package is failing, possibly due to gfortran (or its library path). Below is the output for the failing package installation (sorry about the partly german output).
> install.packages("cluster", type = "source")
versuche URL 'https://cran.rstudio.com/src/contrib/cluster_2.1.4.tar.gz'
Content type 'application/x-gzip' length 352076 bytes (343 KB)
==================================================
downloaded 343 KB
* installing *source* package ‘cluster’ ...
** Paket ‘cluster’ erfolgreich entpackt und MD5 Summen überprüft
** using staged installation
** libs
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c clara.c -o clara.o
gfortran -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c daisy.f -o daisy.o
gfortran -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c dysta.f -o dysta.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c fanny.c -o fanny.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c mona.c -o mona.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c pam.c -o pam.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c sildist.c -o sildist.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c spannel.c -o spannel.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c twins.c -o twins.o
clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o cluster.so clara.o daisy.o dysta.o fanny.o init.o mona.o pam.o sildist.o spannel.o twins.o -L/usr/local/gfortran/lib -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: ignoring file dysta.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file daisy.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
installing to /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-cluster/00new/cluster/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: Laden von Paket oder Namensraum für ‘cluster’ in dyn.load(file, DLLpath = DLLpath, ...): fehlgeschlagen
kann shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-cluster/00new/cluster/libs/cluster.so' nicht laden:
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-cluster/00new/cluster/libs/cluster.so, 0x0006): symbol not found in flat namespace '_dysta_'
Fehler: Laden fehlgeschlagen
Ausführung angehalten
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/cluster’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/cluster’
Warning in install.packages :
Installation des Pakets ‘cluster’ hatte Exit-Status ungleich 0
Die heruntergeladenen Quellpakete sind in
‘/private/var/folders/vg/kjdqgj4j4d949_p782bz80rm0000gn/T/RtmpsJedpT/downloaded_packages’
Could this be related to the architecture arm64?
gfortran is also installed.
Here is the output of sessionInfo() and the setting in ~/.R/Makevars
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib
locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2
# Makevars
FC = gfortran
F77 = gfortran
FLIBS = -L/usr/local/gfortran/lib
I had to set gfortran in ~/.R/Makevars, otherwise R searches in an inconclusive place for gfortran and cannot find it. I checked the FLIBS path with gfortran -print-search-dirs, not sure if this is the correct setting.
Actually, the output seems as the package could be installed but not loaded. Does anybody have any ideas or faced a similar problem?
Thank you!

Related

Trouble installing nlme package

I need to install nlme as it is a dependency for the MSstats package I need. I currently run on R version 4.2.0. When I try to install with Bioc manager I get the following:
> BiocManager::install("MSstats")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.0 (2022-04-22)
Old packages: 'nlme'
Update all/some/none? [a/s/n]:
a
There is a binary version available but the source version is later:
binary source needs_compilation
nlme 3.1-157 3.1-158 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘nlme’
trying URL 'https://cran.rstudio.com/src/contrib/nlme_3.1-158.tar.gz'
Content type 'application/x-gzip' length 845427 bytes (825 KB)
==================================================
downloaded 825 KB
* installing *source* package ‘nlme’ ...
** package ‘nlme’ 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 chol.f -o chol.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c corStruct.c -o corStruct.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c gnls.c -o gnls.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c matrix.c -o matrix.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c nlOptimizer.c -o nlOptimizer.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c nlme.c -o nlme.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c nlmefit.c -o nlmefit.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c pdMat.c -o pdMat.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c pythag.c -o pythag.o
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c rs.f -o rs.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o nlme.so chol.o corStruct.o gnls.o init.o matrix.o nlOptimizer.o nlme.o nlmefit.o pdMat.o pythag.o rs.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nlme.so] Error 1
ERROR: compilation failed for package ‘nlme’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/nlme’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/nlme’
The downloaded source packages are in
‘/private/var/folders/qx/5klvf6g112zb1vzzp5bt8n9r0000gn/T/Rtmpz9mEK5/downloaded_packages’
Warning messages:
1: package(s) not installed when version(s) same as current; use `force = TRUE` to re-install: 'MSstats'
2: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘nlme’ had non-zero exit status

Openssl install failure on MacOS Monterey M1 (arm64) for R 4.2.0 ("Vigorous Calisthenics")

I recently upgraded my R version to the latest release (4.2.0, 2022-04-22). I am receiving this error message when installing openssl package. I have tried installing from both CRAN and GitHub.
This is the error message:
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-openssl/00new/openssl/libs/openssl.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-openssl/00new/openssl/libs/openssl.so, 0x0006): symbol not found in flat namespace '_ASN1_STRING_to_UTF8'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/openssl’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T//RtmpjQXYpT/file13117452ee57a/openssl_2.0.1.tar.gz’ had non-zero exit status
And this is the entire log from the session:
R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> devtools::install_github("jeroen/openssl")
Downloading GitHub repo jeroen/openssl#HEAD
✔ checking for file ‘/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpjQXYpT/remotes1311770b98515/jeroen-openssl-47bf18b/DESCRIPTION’ ...
─ preparing ‘openssl’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ running ‘cleanup’
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘openssl_2.0.1.tar.gz’
* installing *source* package ‘openssl’ ...
** using staged installation
Using PKG_CFLAGS=-I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include
Using PKG_LIBS=-L/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/lib -lssl -lcrypto
** libs
rm -f aes.o base64.o bignum.o cert.o compatibility.o diffie.o envelope.o error.o hash.o info.o keygen.o keys.o onload.o openssh.o password.o pbkdf.o pem.o pkcs12.o pkcs7.o rand.o rsa.o signing.o ssl.o stream.o write.o x25519.o openssl.so bcrypt/libstatbcrypt.a bcrypt/bcrypt_pbkdf.o bcrypt/blowfish.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c aes.c -o aes.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c base64.c -o base64.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c bignum.c -o bignum.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c cert.c -o cert.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c compatibility.c -o compatibility.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c diffie.c -o diffie.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c envelope.c -o envelope.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c error.c -o error.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c hash.c -o hash.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c info.c -o info.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c keygen.c -o keygen.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c keys.c -o keys.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c onload.c -o onload.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c openssh.c -o openssh.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c password.c -o password.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c pbkdf.c -o pbkdf.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c pem.c -o pem.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c pkcs12.c -o pkcs12.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c pkcs7.c -o pkcs7.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c rand.c -o rand.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c rsa.c -o rsa.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c signing.c -o signing.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c ssl.c -o ssl.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c stream.c -o stream.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c write.c -o write.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c x25519.c -o x25519.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c bcrypt/bcrypt_pbkdf.c -o bcrypt/bcrypt_pbkdf.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/include -I/usr/local/opt/openssl#1.1/include -fPIC -falign-functions=64 -Wall -g -O2 -c bcrypt/blowfish.c -o bcrypt/blowfish.o
ar rcs bcrypt/libstatbcrypt.a bcrypt/bcrypt_pbkdf.o bcrypt/blowfish.o
clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/openssl#1.1/lib -o openssl.so aes.o base64.o bignum.o cert.o compatibility.o diffie.o envelope.o error.o hash.o info.o keygen.o keys.o onload.o openssh.o password.o pbkdf.o pem.o pkcs12.o pkcs7.o rand.o rsa.o signing.o ssl.o stream.o write.o x25519.o -Lbcrypt -lstatbcrypt -L/private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/lib -lssl -lcrypto -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/opt/openssl#1.1/lib'
ld: warning: ignoring file /private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/lib/libcrypto.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /private/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T/RtmpOrSTix/R.INSTALL131a33d271a4b/openssl/.deps/lib/libssl.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
installing to /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-openssl/00new/openssl/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-openssl/00new/openssl/libs/openssl.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-openssl/00new/openssl/libs/openssl.so, 0x0006): symbol not found in flat namespace '_ASN1_STRING_to_UTF8'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/openssl’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/5d/z3_6_g1d6d91v4ppjkh4ldnh0000gn/T//RtmpjQXYpT/file13117452ee57a/openssl_2.0.1.tar.gz’ had non-zero exit status
Current session Info:
> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.3.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/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] rstudioapi_0.13 magrittr_2.0.3 usethis_2.1.5 devtools_2.4.3 pkgload_1.2.4 R6_2.5.1
[7] rlang_1.0.2 fastmap_1.1.0 tools_4.2.0 pkgbuild_1.3.1 sessioninfo_1.2.2 cli_3.3.0
[13] withr_2.5.0 ellipsis_0.3.2 remotes_2.4.2 rprojroot_2.0.3 lifecycle_1.0.1 crayon_1.5.1
[19] brio_1.1.3 processx_3.5.3 purrr_0.3.4 callr_3.7.0 fs_1.5.2 ps_1.7.0
[25] curl_4.3.2 testthat_3.1.4 memoise_2.0.1 glue_1.6.2 cachem_1.0.6 compiler_4.2.0
[31] desc_1.4.1 prettyunits_1.1.1
I have openssl#1.1 installed on my machine with homebrew, with the following configurations in my ~/.zshrc file:
### openssl:
path+=("/opt/homebrew/opt/openssl#1.1/bin")
#path+=("/opt/homebrew/opt/openssl#3/bin")
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
#export LDFLAGS="-L/opt/homebrew/opt/openssl#3/lib"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#1.1/lib/pkgconfig"
export LD_LIBRARY_PATH="/opt/homebrew/opt/openssl#1.1/lib"
# export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#3/lib/pkgconfig"
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/homebrew/opt/openssl#1.1"
Any ideas? I noticed the issue about a week after downloading and installing the new R version when I tried using the googlesheets4 package.

Unable to install a package on R

I'm getting an issue when I try to install Bioconductor for R. I've searched everywhere for solutions however nothing is really working for me. Please, any advice?
The downloaded binary packages are in
/var/folders/74/y92tqhzj0l98l6syjjl7vtcr0000gn/T//RtmpNYOkbZ/downloaded_packages
Old packages: 'nlme'
Update all/some/none? [a/s/n]:
a
Warning: unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘nlme’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package ‘nlme’
trying URL 'https://cran.rstudio.com/src/contrib/nlme_3.1-144.tar.gz'
Content type 'application/x-gzip' length 778660 bytes (760 KB)
==================================================
downloaded 760 KB
* installing *source* package ‘nlme’ ...
** package ‘nlme’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fPIC -Wall -g -O2 -c chol.f -o chol.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c corStruct.c -o corStruct.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c gnls.c -o gnls.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c matrix.c -o matrix.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c nlOptimizer.c -o nlOptimizer.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c nlme.c -o nlme.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c nlmefit.c -o nlmefit.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c pdMat.c -o pdMat.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c pythag.c -o pythag.o
gfortran -fPIC -Wall -g -O2 -c rs.f -o rs.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o nlme.so chol.o corStruct.o gnls.o init.o matrix.o nlOptimizer.o nlme.o nlmefit.o pdMat.o pythag.o rs.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nlme.so] Error 1
ERROR: compilation failed for package ‘nlme’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/nlme’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/nlme’
The downloaded source packages are in
‘/private/var/folders/74/y92tqhzj0l98l6syjjl7vtcr0000gn/T/RtmpNYOkbZ/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘nlme’ had non-zero exit status
I've tried to reinstall R and it didn't work.
The code I am using to install bioconductor is:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.10")
I had the same problem. This happens since I updated to R4.0. I've seen that in Mac (and maybe Windows) can be related to missing Rtools. In Linux, I tried to install the package from other mirrors (this solved my problem in the past), but no success. Finally, I realized that the initial error is "make: gfortran: No such file or directory"
Therefore, I installed gcc & gcc-fortran and that solved it!
In Manjaro, Arch linux:
pacman -S gcc
pacman -S gcc-fortran
In Debian or Ubuntu should be:
sudo apt update
sudo apt install build-essential
sudo apt-get install manpages-dev
gcc --version
Check here for more information:
https://linuxize.com/post/how-to-install-gcc-compiler-on-debian-10/
https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/
https://linuxhostsupport.com/blog/how-to-install-gcc-on-ubuntu-18-04/
Because now the new version of Bioconductor is BiocManager, try to use this one: install.packages("BiocManager")
Apparently, it is trying to install package nlme as a dependency and fails doing that. Did you try installing that one manually before installing Bioconductor ? That could give us more info on the issue.
Just as a heads up for someone who encounters similar issue. I was presented with a choice of installing a binary or compiling from scratch. As I chose compilation option, it was failing to install nlme. However, installation of binary was successful and there was a minor version difference between the source and the binary.

R openair installation fails after upgrade to MRAN 3.4.1

I've been using the openair package on my mac with Rstudio and MRAN v 3.4 for some time with no problem. I recently upgraded to MRA v 3.4.1 and am now getting the following messages, that ultimately end in an error. Suggestions on how to fix appreciated.
> install_github('davidcarslaw/openair')
Downloading GitHub repo davidcarslaw/openair#master
from URL https://api.github.com/repos/davidcarslaw/openair/zipball/master
Installing openair
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
'/private/var/folders/bv/881_rsvd2kv83c13yywwc_xh0000gn/T/Rtmpz6778s/devtoolscf5234a1e7d/davidcarslaw-openair-b782399' \
--library='/Users/gcn/Library/R/3.4/library' --install-tests
* installing *source* package ‘openair’ ...
** libs
clang-omp++ -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Users/gcn/Library/R/3.4/library/Rcpp/include" -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -fPIC -g -O3 -Wall -pedantic -mtune=native -std=c++11 -c cluster.cpp -o cluster.o
clang-omp -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Users/gcn/Library/R/3.4/library/Rcpp/include" -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -fPIC -g -O3 -Wall -pedantic -mtune=native -std=gnu99 -c init.c -o init.o
init.c:26:2: warning: no newline at end of file [-Wnewline-eof]
}
^
1 warning generated.
clang-omp++ -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Users/gcn/Library/R/3.4/library/Rcpp/include" -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -fPIC -g -O3 -Wall -pedantic -mtune=native -std=c++11 -c rolling.cpp -o rolling.o
clang-omp++ -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/clang4/lib -o openair.so cluster.o init.o rolling.o -framework Accelerate -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
installing to /Users/gcn/Library/R/3.4/library/openair/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4.1-MRO/Resources/library/Matrix/libs/Matrix.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4.1-MRO/Resources/library/Matrix/libs/Matrix.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4.1-MRO/Resources/library/Matrix/libs/Matrix.so
Reason: image not found
ERROR: lazy loading failed for package ‘openair’
* removing ‘/Users/gcn/Library/R/3.4/library/openair’
Installation failed: Command failed (1)
This problem went away after I uninstalled all R versions and then installed MRAN version 3.4.2 when it came out. According to MRAN software support "You're right, it is a bug in MRO 3.4.1. Because MRO uses the Accelerate libraries for BLAS and LAPACK operations, it does not create the libRblas and libRlapack dylibs; binary packages that use those libraries are currently incompatible with MRO, but the default package type was set in MRO 3.4.1 to "macbinary-el-capitan". This has been changed in the upcoming MRO 3.4.2 back to the original "source". "

Error when installing xml2 package on Mavericks

I'm trying to install devtools package in R, and as its dependency xml2 needs to be installed, but I'm getting the following error message.
> install.packages("xml2")
Installing package into ‘/Users/xlong3/Library/R/3.2/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/xml2_0.1.2.tar.gz'
Content type 'application/x-gzip' length 74808 bytes (73 KB)
==================================================
downloaded 73 KB
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/Users/xlong3/anaconda/include/libxml2
Using PKG_LIBS=-L/Users/xlong3/anaconda/lib -lxml2 -lz -liconv -lm
** libs
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c connection.cpp -o connection.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c xml2_doc.cpp -o xml2_doc.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c xml2_init.cpp -o xml2_init.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c xml2_namespace.cpp -o xml2_namespace.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c xml2_node.cpp -o xml2_node.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c xml2_url.cpp -o xml2_url.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c xml2_xpath.cpp -o xml2_xpath.o
clang++ -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG -I/Users/xlong3/anaconda/include/libxml2 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I"/Users/xlong3/Library/R/3.2/library/Rcpp/include" -I"/usr/local/lib/R/3.2/site-library/BH/include" -fPIC -g -O2 -c xml_push.cpp -o xml_push.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -o xml2.so RcppExports.o connection.o xml2_doc.o xml2_init.o xml2_namespace.o xml2_node.o xml2_url.o xml2_xpath.o xml_push.o -L/Users/xlong3/anaconda/lib -lxml2 -lz -liconv -lm -F/usr/local/Cellar/r/3.2.2_1/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
installing to /Users/xlong3/Library/R/3.2/library/xml2/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Users/xlong3/Library/R/3.2/library/xml2/libs/xml2.so':
dlopen(/Users/xlong3/Library/R/3.2/library/xml2/libs/xml2.so, 6): Library not loaded: libxml2.2.dylib
Referenced from: /Users/xlong3/Library/R/3.2/library/xml2/libs/xml2.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/xlong3/Library/R/3.2/library/xml2’
The downloaded source packages are in
‘/private/tmp/RtmpJc4WKq/downloaded_packages’
Warning message:
In install.packages("xml2") :
installation of package ‘xml2’ had non-zero exit status
>
> version
_
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
version.string R version 3.2.2 (2015-08-14)
nickname Fire Safety
The problem is that 'pkg-config' is looking specifically for 'libxml2.pc' and the file that you have installed is named, "libxml-2.0.pc". If you manually create a symbolic link between the existing file and the one pkg-config expects, it should resolve that error.
Something like this (done in the same directory as the file) should work
$ ln -s libxml-2.0.pc libxml2.pc
I'm not sure how should I proceed from the following situation:
pkg-config --libs --cflags libxml2
Package libxml2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml2' found
brew ls libxml2
/usr/local/Cellar/libxml2/2.9.2/bin/xml2-config
/usr/local/Cellar/libxml2/2.9.2/bin/xmlcatalog
/usr/local/Cellar/libxml2/2.9.2/bin/xmllint
/usr/local/Cellar/libxml2/2.9.2/include/libxml2/ (47 files)
/usr/local/Cellar/libxml2/2.9.2/lib/libxml2.2.dylib
/usr/local/Cellar/libxml2/2.9.2/lib/cmake/libxml2/libxml2-config.cmake
/usr/local/Cellar/libxml2/2.9.2/lib/pkgconfig/libxml-2.0.pc
/usr/local/Cellar/libxml2/2.9.2/lib/ (3 other files)
/usr/local/Cellar/libxml2/2.9.2/share/aclocal/libxml.m4
/usr/local/Cellar/libxml2/2.9.2/share/doc/ (153 files)
/usr/local/Cellar/libxml2/2.9.2/share/gtk-doc/ (55 files)
/usr/local/Cellar/libxml2/2.9.2/share/man/ (4 files)
Try to change your CRAN mirror

Resources