I would like to use the R packages RNetCDF and ncdf in Ubuntu.
When I try install.packages('RNetCDF') or install.packages('ncdf'), I get similar errors:
...
ncdf.c:3:20: fatal error: netcdf.h: No such file or directory
compilation terminated.
make: *** [ncdf.o] Error 1
ERROR: compilation failed for package ‘ncdf’
...
Warning message:
In install.packages("ncdf") :
installation of package ‘ncdf’ had non-zero exit status
The packages libnetcdf6 and netcdf-bin from the Ubuntu repository are installed. Do I need to do something else?
-devof those packages to get the headers that are required to compile the package. – Justin Jul 3 '12 at 21:51ncdfwaslibnetcdf-dev– Abe Jul 3 '12 at 21:54RNetCDF,udunits-binandlibudunits2-devare also required – Abe Jul 3 '12 at 21:58