[R] RQuantLib installation problem

Naresh Gurbuxani n@re@h_gurbux@n| @end|ng |rom hotm@||@com
Sun Sep 24 04:19:20 CEST 2023


In my mac, using brew, I installed boost and quantlib packages.  But
installation of RQuantLib errored out because R could not find
libgfortran.5.dylib

My mac does have this file, but in a different location.  Is there a
simple fix to install RQuantLib?

Thanks,
Naresh

~ $ ls /usr/local/gfortran/lib/libgfortran.5.dylib 
/usr/local/gfortran/lib/libgfortran.5.dylib

> install.packages("RQuantLib", repos = "https://cran.r-project.org")
Installing package into ‘/usr/local/lib/R/4.1/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.r-project.org/src/contrib/RQuantLib_0.4.17.tar.gz'
Content type 'application/x-gzip' length 193331 bytes (188 KB)
==================================================
downloaded 188 KB

dyld[29996]: Library not loaded: /usr/local/opt/gcc/lib/gcc/11/libgfortran.5.dylib
  Referenced from: <383F3774-06DE-3792-AA2C-C9D6B37A2D89> /usr/local/Cellar/r/4.1.2/lib/R/lib/libR.dylib
  Reason: tried: '/usr/local/opt/gcc/lib/gcc/11/libgfortran.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gcc/lib/gcc/11/libgfortran.5.dylib' (no such file), '/usr/local/opt/gcc/lib/gcc/11/libgfortran.5.dylib' (no such file), '/usr/local/Cellar/r/4.1.2/lib/R/lib/libgfortran.5.dylib' (no such file), '/usr/local/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home/lib/server/libgfortran.5.dylib' (no such file)
/usr/local/Cellar/r/4.1.2/lib/R/bin/INSTALL: line 34: 29995 Done                    echo 'tools:::.install_packages()'
     29996 Abort trap: 6           | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}

The downloaded source packages are in
	‘/private/var/folders/97/5377j5_d207fshvjz_pz7szw0000gn/T/Rtmp9gBaE0/downloaded_packages’
Warning message:
In install.packages("RQuantLib", repos = "https://cran.r-project.org") :
  installation of package ‘RQuantLib’ had non-zero exit status


More information about the R-help mailing list