我想在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
Run Code Online (Sandbox Code Playgroud)
已安装软件包libnetcdf6和netcdf-binUbuntu存储库.我还需要做点什么吗?
我正在尝试在R中安装udunits2以满足ggforce包的依赖性.但是,安装程序在检查udunits2时仍然失败.我曾尝试在所述指令这个(udunits 2 devel的安装如图此处.)和此螺纹,其产生相同的结果作为试图install.packages('udunits2').
我只是通过安装udunits2-dev就可以让它在我的Mint机器上运行,但是我对Fedora很新,并且我不确定是什么导致了这一点.
系统信息:
Fedora 28,R-3.4.4
编辑
尝试安装时出错install.packages("udunits2", configure.args = "--with-udunits2-lib=/usr/bin/udunits2"):
* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -m64
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... …Run Code Online (Sandbox Code Playgroud)