To give credit to Simon, at https://mac.r-project.org/bin instructions include a note that “If you do not have write permission, you may need to make it writeable or run sudo R.”
I ran sudo R and was able to install and download boost. ~ $ ls /opt/R/x86_64/include/ boost itclInt.h tcl.h tclTomMathDecls.h fakemysql.h itclIntDecls.h tclDecls.h tdbc.h fakepq.h itclMigrate2TclCore.h tclOO.h tdbcDecls.h fakesql.h itclTclIntStubsFcn.h tclOODecls.h tdbcInt.h itcl.h mysqlStubs.h tclPlatDecls.h tk.h itcl2TclOO.h odbcStubs.h tclThread.h tkDecls.h itclDecls.h pqStubs.h tclTomMath.h tkPlatDecls.h ~ $ However, I am still not able to install RQuantLib. It does not find boost. > install.packages("RQuantLib", type = "source", lib = .libPaths()[2], > configure.args = c("--with-boost-include=/opt/R/x86_64/include/boost"), > configure.vars = c("CPPFLAGS='-DQL_HIGH_RESOLUTION_DATE'")) trying URL 'https://cran.r-project.org/src/contrib/RQuantLib_0.4.24.tar.gz' Content type 'application/x-gzip' length 195836 bytes (191 KB) ================================================== downloaded 191 KB * installing *source* package ‘RQuantLib’ ... ** package ‘RQuantLib’ successfully unpacked and MD5 sums checked ** using staged installation 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 x86_64 -std=gnu++17 accepts -g... yes checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 features... none needed checking how to run the C++ preprocessor... clang++ -arch x86_64 -std=gnu++17 -E checking whether the compiler supports GNU C++... (cached) yes checking whether clang++ -arch x86_64 -std=gnu++17 accepts -g... (cached) yes checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 features... (cached) none needed checking for R... yes checking for quantlib-config... yes checking for suitable QuantLib version... yes (1.36) checking for Boost development files... no configure: error: Boost development files not found ERROR: configuration failed for package ‘RQuantLib’ * removing ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/RQuantLib’ The downloaded source packages are in ‘/private/var/folders/nb/2vppcjgd19l_h9brvzgdjcm40000gn/T/Rtmp7YHJMO/downloaded_packages’ Warning message: In install.packages("RQuantLib", type = "source", lib = .libPaths()[2], : installation of package ‘RQuantLib’ had non-zero exit status > > On Mar 23, 2025, at 10:44 AM, Peter Dalgaard <pda...@gmail.com> wrote: > > You'd need to change the "-C /" in the tar command. I trust Simon enough to > just run the script as root, though... > > -pd > >> On 23 Mar 2025, at 14.37, Naresh Gurbuxani <naresh_gurbux...@hotmail.com> >> wrote: >> >> Peter, >> >> In install.libs(), there is no argument for setting location where boost or >> other packages are installed. How can I select a different directory to >> install boost using install.libs()? >> >> Thanks, >> Naresh >> >>> On Mar 23, 2025, at 7:55 AM, Naresh Gurbuxani >>> <naresh_gurbux...@hotmail.com> wrote: >>> >>> >>> notes $ which tar >>> /opt/local/libexec/gnubin/tar >>> notes $ tar --version >>> tar (GNU tar) 1.35 >>> Copyright (C) 2023 Free Software Foundation, Inc. >>> License GPLv3+: GNU GPL version 3 or later >>> <https://gnu.org/licenses/gpl.html>. >>> This is free software: you are free to change and redistribute it. >>> There is NO WARRANTY, to the extent permitted by law. >>> >>> Written by John Gilmore and Jay Fenlason. >>> notes $ >>> >>> I use MacPorts package manager to install most software. For R, I switched >>> to manual install because, with MacPorts data.table could not pick up >>> openmp support. >>> >>> Using uppercase J as suggested by Rodney successfully downloaded boost on >>> my computer. But it cannot install. Below are first few lines of messages: >>> >>>> install.libs("boost") >>> Downloading https://mac.R-project.org/bin/REPOS ... >>> Using repository https://mac.R-project.org/bin/darwin20/x86_64 ... >>> Downloading index https://mac.R-project.org/bin/darwin20/x86_64/PACKAGES >>> ... >>> Downloading + installing >>> https://mac.R-project.org/bin/darwin20/x86_64/boost-1.86.0-darwin.20-x86_64.tar.xz >>> ... >>> tar: opt/R/x86_64/include: Cannot utime: Permission denied >>> tar: opt/R/x86_64/lib: Cannot utime: Permission denied >>> tar: opt/R/x86_64/pkg/boost-1.86.0-darwin.20-x86_64.list: Cannot open: >>> Permission denied >>> (Many more lines with Permission denied message) >>> >>> I have another question. I need boost to install RQuantLib. My computer >>> already has MacPorts-installed boost and MacPorts installed QuantLib. But >>> RQuantLib installation is not picking up boost. Is there a way to get that >>> working? >>> >>>> install.packages("RQuantLib", lib = .libPaths()[2], repos = >>>> "https://cran.r-project.org", type = "source", configure.args = >>>> c("--with-boost-include=/opt/local/libexec/boost/1.76/include/"), >>>> configure.vars = c("CPPFLAGS='-DQL_HIGH_RESOLUTION_DATE'")) >>> trying URL 'https://cran.r-project.org/src/contrib/RQuantLib_0.4.24.tar.gz' >>> Content type 'application/x-gzip' length 195836 bytes (191 KB) >>> ================================================== >>> downloaded 191 KB >>> >>> * installing *source* package ‘RQuantLib’ ... >>> ** package ‘RQuantLib’ successfully unpacked and MD5 sums checked >>> ** using staged installation >>> 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 x86_64 -std=gnu++17 accepts -g... yes >>> checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 >>> features... none needed >>> checking how to run the C++ preprocessor... clang++ -arch x86_64 >>> -std=gnu++17 -E >>> checking whether the compiler supports GNU C++... (cached) yes >>> checking whether clang++ -arch x86_64 -std=gnu++17 accepts -g... (cached) >>> yes >>> checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 >>> features... (cached) none needed >>> checking for R... yes >>> checking for quantlib-config... yes >>> checking for suitable QuantLib version... yes (1.36) >>> checking for Boost development files... no >>> configure: error: Boost development files not found >>> ERROR: configuration failed for package ‘RQuantLib’ >>> * removing >>> ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/RQuantLib’ >>> >>> The downloaded source packages are in >>> ‘/private/var/folders/nb/2vppcjgd19l_h9brvzgdjcm40000gn/T/RtmpKL66sI/downloaded_packages’ >>> Warning message: >>> In install.packages("RQuantLib", lib = .libPaths()[2], repos = >>> "https://cran.r-project.org", : >>> installation of package ‘RQuantLib’ had non-zero exit status >>> In terminal >>> notes $ ls /opt/local/libexec/boost/1.76/include/ >>> boost >>> >>>> On Mar 23, 2025, at 6:21 AM, peter dalgaard <pda...@gmail.com> wrote: >>>> >>>> Oddly, this doesn't happen here, even though I also tar xj instead of xJ >>>> ot the .xz file. >>>> >>>> Any chance you two could be picking up a different tar? I am seeing >>>> >>>> PeterDaardsiMac:ISwR pd$ which tar >>>> /usr/bin/tar >>>> PeterDaardsiMac:ISwR pd$ tar --version >>>> bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 >>>> >>>> and "man tar" claims that j and J options are "c mode only" so presumably >>>> ignored and tar gets the compression type from the input itself. >>>> >>>> -pd >>>> >>>>> On 22 Mar 2025, at 15.53, Sparapani, Rodney via R-SIG-Mac >>>>> <r-sig-mac@r-project.org> wrote: >>>>> >>>>> Hi Naresh: >>>>> >>>>> I’m seeing the same error message. And it makes sense >>>>> because the boost tar-ball is compressed with xz and >>>>> not bzip2. On line 87 of install.R, we have the following… >>>>> if (system(paste("curl", "-sSL", shQuote(u), "|", "tar fxj - -C /")) < 0) >>>>> Little j means bzip2 while big J is xz. So try substituting… >>>>> if (system(paste("curl", "-sSL", shQuote(u), "|", "tar fxJ - -C /")) < 0) >>>>> >>>>> -- >>>>> Rodney Sparapani, Associate Professor of Biostatistics >>>>> President, Wisconsin Chapter of the American Statistical Association >>>>> Division of Biostatistics, Data Science Institute >>>>> Medical College of Wisconsin, Milwaukee Campus >>>>> >>>>> >>>>> From: R-SIG-Mac <r-sig-mac-boun...@r-project.org> on behalf of Naresh >>>>> Gurbuxani <naresh_gurbux...@hotmail.com> >>>>> Date: Saturday, March 22, 2025 at 8:02 AM >>>>> To: r-sig-mac@r-project.org <r-sig-mac@r-project.org> >>>>> Subject: [R-SIG-Mac] install.libs error >>>>> Downloading + installing >>>>> https://mac.R-project.org/bin/darwin20/x86_64/boost-1.86.0-darwin.20-x86_64.tar.xz$<https://mac.R-project.org/bin/darwin20/x86_64/boost-1.86.0-darwin.20-x86_64.tar.xz%20$> >>>>> ... >>>>> bzip2: (stdin) is not a bzip2 file. >>>>> tar: Child died with signal 13 >>>>> tar: Error is not recoverable: exiting now >>>>> curl: (23) Failure writing output to destination, passed 8192 returned 0 >>>>> >>>>> [[alternative HTML version deleted]] >>>>> >>>>> _______________________________________________ >>>>> R-SIG-Mac mailing list >>>>> R-SIG-Mac@r-project.org >>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >>>> >>>> -- >>>> Peter Dalgaard, Professor, >>>> Center for Statistics, Copenhagen Business SchoolSolbjerg Plads 3, 2000 >>>> Frederiksberg, Denmark >>>> Phone: (+45)38153501 >>>> Office: A 4.23 >>>> Email: pd....@cbs.dk Priv: pda...@gmail.com >>> >>> >>> _______________________________________________ >>> R-SIG-Mac mailing list >>> R-SIG-Mac@r-project.org >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> > > -- > Peter Dalgaard, Professor, > Center for Statistics, Copenhagen Business SchoolSolbjerg Plads 3, 2000 > Frederiksberg, Denmark > Phone: (+45)38153501 > Office: A 4.23 > Email: pd....@cbs.dk Priv: pda...@gmail.com > _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac