Installing the ncdf package for R with the netcdf library version 4
The "ncdf" package for R is designed to work with the netcdf library version 3. If you are having problems installing ncdf when you have the netcdf library version 4 installed, then the easiest fix is to simply install the netcdf library version 3, which is available here.
If you are dead set on using ncdf with the netcdf library version 4, read on.
The only issue is getting the libraries right. All the libraries used by the netcdf library, version 4, must be visible to the R software. To get a list of what libraries must be visible, run "nc-config --libs" (note: a recent version of the netcdf library, version 4, must be installed correctly for this command to work).
Note what library paths are in the output of that command, and add all those paths to your LD_LIBRARY_PATH environmental variable. That should allow R to be able to load the netcdf version 4 library without complaining about missing symbols, such as ones with "curl" or "HDF" in their name.
Last modified: 8 October 2010