我想在Ubuntu中使用R包RNetCDF和ncdf。如何在Ubuntu上安裝R軟件包「RNetCDF」和「ncdf」?
當我嘗試install.packages('RNetCDF')
或,我得到類似的錯誤:
...
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
的包從Ubuntu庫libnetcdf6
和netcdf-bin
安裝。我需要做其他事嗎?
您需要安裝這些軟件包的'-dev'來獲取編譯軟件包所需的頭文件。 – Justin
@Justin謝謝。 'ncdf'所需的唯一附加軟件包是libNetcdf-dev' – Abe
for'RNetCDF','udunits-bin'和'libudunits2-dev'也是必需的 – Abe