I’m trying to install the “rtdists” packag. It needs “gsl” but installing was failed. Checking a couple of pages, I first installed gsl generally on terminal, with homebrwe (brew install gsl). But Rstudio still shows the following error. Please help me.
> install.packages("rtdists")
also installing the dependency ‘gsl’
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘gsl’ ‘rtdists’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source packages ‘gsl’, ‘rtdists’
trying URL 'https://cran.rstudio.com/src/contrib/gsl_2.1-8.tar.gz'
Content type 'application/x-gzip' length 217997 bytes (212 KB)
==================================================
downloaded 212 KB
trying URL 'https://cran.rstudio.com/src/contrib/rtdists_0.11-5.tar.gz'
Content type 'application/x-gzip' length 532264 bytes (519 KB)
==================================================
downloaded 519 KB
* installing *source* package ‘gsl’ ...
** package ‘gsl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... clang -arch arm64
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether clang -arch arm64 accepts -g... yes
checking for clang -arch arm64 option to enable C11 features... none needed
checking for gsl-config... /usr/local/bin/gsl-config
checking if GSL version >= 2.5... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c airy.c -o airy.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c bessel.c -o bessel.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c clausen.c -o clausen.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c coulomb.c -o coulomb.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c coupling.c -o coupling.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c dawson.c -o dawson.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c debye.c -o debye.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c dilog.c -o dilog.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c ellint.c -o ellint.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c elljac.c -o elljac.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/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/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c expint.c -o expint.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c fermi_dirac.c -o fermi_dirac.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c gamma.c -o gamma.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c gegenbauer.c -o gegenbauer.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c hyperg.c -o hyperg.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -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/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c laguerre.c -o laguerre.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c lambert.c -o lambert.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c legendre.c -o legendre.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c log.c -o log.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c poly.c -o poly.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c pow_int.c -o pow_int.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c psi.c -o psi.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c qrng.c -o qrng.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c rng.c -o rng.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c synchrotron.c -o synchrotron.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c transport.c -o transport.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c trig.c -o trig.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c vector.c -o vector.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/gsl/2.7.1/include -I. -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c zeta.c -o zeta.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 gsl.so airy.o bessel.o clausen.o coulomb.o coupling.o dawson.o debye.o dilog.o ellint.o elljac.o error.o expint.o fermi_dirac.o gamma.o gegenbauer.o hyperg.o init.o laguerre.o lambert.o legendre.o log.o poly.o pow_int.o psi.o qrng.o rng.o synchrotron.o transport.o trig.o vector.o zeta.o -L/usr/local/Cellar/gsl/2.7.1/lib -lgsl -lgslcblas -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: ignoring file /usr/local/Cellar/gsl/2.7.1/lib/libgsl.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/Cellar/gsl/2.7.1/lib/libgslcblas.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
installing to /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/00LOCK-gsl/00new/gsl/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘gsl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/00LOCK-gsl/00new/gsl/libs/gsl.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/00LOCK-gsl/00new/gsl/libs/gsl.so, 0x0006): symbol not found in flat namespace (_gsl_poly_eval)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/gsl’
Warning in install.packages :
installation of package ‘gsl’ had non-zero exit status
ERROR: dependency ‘gsl’ is not available for package ‘rtdists’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rtdists’
Warning in install.packages :
installation of package ‘rtdists’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/jh/hzvwkysn7jv9sjg0qcldrdh00000gn/T/RtmpS2Eeeg/downloaded_packages’
MacBook Pro 2021
macOS Monterey version 12.6.6
Apple M1 Max
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Rstudio version2023.03.1+446 (2023.03.1+446)