我想在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
安装了Ubuntu存储库中的libnetcdf6和netcdf-bin包.我还需要做别的吗?
您需要安装这些包的-dev以获取编译包所需的头.在这种情况下,您需要libnetcdf-dev,udunits-bin和libudunits2-dev
原文链接:https://www.f2er.com/ubuntu/349191.html