Open Rae-Spr opened 10 months ago
I have even tried the direct download in R studio: library(remotes) install_github("https://github.com/mjwoods/RNetCDF.git")
Same issue, it seems.
One thing to check is that the netcdf package from Homebrew may contain a program called nc-config
. Can you run that in your Terminal? You may need to add its directory to your PATH environment variable. Once RNetCDF can find that, it should automatically find the other netcdf files that it needs.
If you can't get that to work, you may be able to install RNetCDF from R using the following command (or similar):
install.packages("RNetCDF", configure.args=c("CPPFLAGS=-I/opt/homebrew/Cellar/netcdf/4.9.2_1/include", "LDFLAGS=-L/opt/homebrew/Cellar/netcdf/4.9.2_1/lib")
If that still doesn't work, you could try installing the latest version of R (and optionally RStudio). Then install.packages
should find a binary package for RNetCDF, avoiding the need for compilation.
Hello. I'm running RStudio, version 2022.07.1 554 Build "Spotted Wakerobin" Release for macOS. My computer's MacOS is Monterey Version 12.3.
I am unable to download the RNetCDF package. I keep getting the same error code despite each step I've taken to fix the issue and try the download again (screenshots below). Please note that it is the same outcome whether I use
renv::install()
orinstall.packages()
.I have homebrew, so I tried brew install netcdf in terminal.
I think that worked! No error messages and I can see the download in my homebrew pathway in Finder.
However, RNetCDF still won't download in my RProject / session. I have tried manually setting the CPPFLAGS and LD_LIBRARY_PATH (using the pathway to the Homebrew folder) in the R terminal.
I have tried setting these in my Mac's terminal. Same code as above:
I have tried R CMD install in Terminal. Code below:
After every step I've tried, I've attempted a package download in R studio and it has not worked. Same error every time. Any ideas on how to solve this? Thank you in advance!