Closed damonbayer closed 1 month ago
I'm able to reproduce on my macOS machine as well, even though I have netcdf
and hdf5
installed from Homebrew.
I note this output:
$ nc-config --libs --static
-L/opt/homebrew/Cellar/netcdf/4.9.2_2/lib -lnetcdf -lhdf5_hl-shared -lhdf5-shared -lm -lz -lzstd -lbz2 -lcurl -lxml2
However, the hdf5
installation from Homebrew doesn't actually provide -lhdf5_hl-shared -lhdf5-shared
. I don't know if this would be considered a bug in netcdf
or Homebrew, though.
In addition, R only supports installation of CRAN binary packages with the official CRAN builds of R.
@kevinushey Are you also able to reproduce "I have also successfully installed it on macOS outside of renv."?
I think you are suggesting the homebrew installations are incomplete, but I must have all the right pieces somehow. They just can't be found when using renv
.
The package installs successfully with renv
for me, as long as I'm using a CRAN build of R:
> renv::install("RNetCDF", rebuild = TRUE)
# Downloading packages -------------------------------------------------------
- Downloading RNetCDF from CRAN ... OK [file is up to date]
Successfully downloaded 1 package in 0.26 seconds.
The following package(s) will be installed:
- RNetCDF [2.9-2]
These packages will be installed into "~/Library/R/arm64/4.4/library".
Do you want to proceed? [Y/n]:
# Installing packages --------------------------------------------------------
- Installing RNetCDF ... OK [installed binary and cached]
Successfully installed 1 package in 0.17 seconds.
You could also try explicitly installing a binary with renv::install("RNetCDF", type = "binary")
.
Can't say I fully followed this conversation or at all understand why this worked, but running renv::install("RNetCDF", rebuild = TRUE)
resulted in a successful installation.
I am unable to install
RNetCDF
withinrenv
on macOS.I have successfully installed it within
renv
on Ubuntu. I have also successfully installed it on macOS outside ofrenv
.Install log: