如何在Ubuntu上安装R包“RNetCDF”和“ncdf”?

前端之家收集整理的这篇文章主要介绍了如何在Ubuntu上安装R包“RNetCDF”和“ncdf”?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想在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

猜你在找的Ubuntu相关文章