Abe*_*Abe 9 installation r deb netcdf
我想在Ubuntu中使用R软件包RNetCDF和ncdf.
当我尝试install.packages('RNetCDF')或install.packages('ncdf'),我得到类似的错误:
...
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
已安装软件包libnetcdf6和netcdf-binUbuntu存储库.我还需要做点什么吗?
小智 6
就我而言,需要libudunits2-dev包.
sudo apt-get install libudunits2-dev
由于我从源代码安装了NetCDF,因此我不得不手动指定lib的位置并包含文件夹
install.packages("/home/user/Downloads/RNetCDF_1.6.1-2.tar.gz", 
repos = NULL,
type="source",
dependencies=FALSE,
configure.args="--with-netcdf-include=/usr/local/netcdf-4.2.1-build/include --with-netcdf-lib=/usr/local/netcdf-4.2.1-build/lib")