Closed alexWhitworth closed 1 year ago
Usually only the binary program is under */bin/
. I very much doubt that the lib and the headers are there too. Did you specifically try what the error message suggests?
Yes, I also specifically tried what the error suggests (updated OP appropriately). Based on #236, I tried adding the following to Makevars
and rerunning above commands. All lead to the same failure
CPPFLAGS=-I/usr/local/include
Then I suggest you try asking for help in the r-sig-mac mailing list. Package installation works with CRAN R for macOS, but unfortunately we ourselves are not macOS users, so we cannot debug issues with setups beyond what CRAN offers.
What is wrong with installing a binary package?
install.packages("units", configure.args = c("--with-udunits2-include=/opt/homebrew/Cellar/udunits/2.2.28/include", "--with-udunits2-lib=/opt/homebrew/Cellar/udunits/2.2.28/lib"))
Worked for me. I think brew is installing it in a new place. On Mac Silicon (arm64), fwiw
Interesting. @dewoller's command with modifications for my udunits
location and a blank ~/R/.Makevars
worked for me. So, it appears the Makevars
file may have been the issue (or the upgrade to R 4.3.1).
I'm trying to install
units
on Mac OSX 12.5. I have tried both installingudunits
from brew and by downloading the tarball from the FTP noted in this package's README.Any help much appreciated!
Error:
All of the following fail with the same error:
install.package("units")
install.packages("units", configure.args="--with-udunits2-lib=/opt/local/bin/udunits2/lib")
install.packages("units", configure.args="--with-udunits2-include=/opt/local/bin/udunits2/include")
install.packages("units", configure.args="--with-udunits2-lib=/opt/local/bin/udunits2/lib --with-udunits2-include=/opt/local/bin/udunits2/include")
install.packages("units", configure.args= "--with-udunits2-lib=/usr/local/lib")
install.packages("units", configure.args= "--with-udunits2-include=/usr/include/udunits2")
install.packages("units", configure.args= c("--with-udunits2-lib=/usr/local/lib", "--with-udunits2-include=/usr/include/udunits2"))
SessionInfo
Makevars:
I have also tried adding various combinations of the below, though none of them have any impact on the installation error I receive.