如题。自己也查找了一些资料,可能问题出现在centos的NetCDF,还有HDF-5。
于是再找资料,按资料搞了一顿,还是不行。问题出在了安装netcdf-fortran 库上。
请问各位大神这个解决方法是正确的吗
CentOS 7.6 系统上添加最新版 NetCDF 4.6.1https://www.cnblogs.com/snake553/p/7455453.html
现在附上报错信息:
install.packages('ncdf4')
#报错
* installing *source* package ‘ncdf4’ ...
** package ‘ncdf4’ successfully unpacked and MD5 sums checked
** using staged installation
configure.ac: starting
checking for nc-config... yes
Using nc-config: nc-config
Output of nc-config --all:
This netCDF 4.6.1 has been built with the following features:
--cc -> gcc
--cflags -> -I/root/nianbin/software/amber18/include
--libs -> -L/root/nianbin/software/amber18/lib -lnetcdf -lm
--has-c++ -> no
--cxx ->
--has-c++4 -> no
--cxx4 ->
--has-fortran-> yes
--fc -> gfortran
--fflags -> -I/root/nianbin/software/amber18/include
--flibs -> -L/root/nianbin/software/amber18/lib -lnetcdff -L/root/nianbin/software/amber18/lib -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes
--has-dap -> no
--has-dap4 -> no
--has-nc2 -> yes
--has-nc4 -> no
--has-hdf5 -> no
--has-hdf4 -> no
--has-logging-> no
--has-pnetcdf-> no
--has-szlib ->
--has-parallel -> no
--has-cdf5 -> yes
--prefix -> /root/nianbin/software/amber18
--includedir-> /root/nianbin/software/amber18/include
--libdir -> /root/nianbin/software/amber18/lib
--version -> netCDF 4.6.1
---
netcdf.m4: about to set rpath, here is source string: >-L/root/nianbin/software/amber18/lib -lnetcdf -lm<
netcdf.m4: final rpath: -Wl,-rpath,/root/nianbin/software/amber18/lib
Netcdf library version: netCDF 4.6.1
Netcdf library has version 4 interface present: no
Netcdf library was compiled with C compiler: gcc
-------------------------------------------------------------------
ncdf4 REQUIRES the netcdf library be version 4 or above,
AND installed with HDF-5 support (i.e., the netcdf library must be
compiled with the --enable-netcdf-4 flag). If you don't want to install
the full version of netcdf-4 with HDF-5 support, then please install
the old, deprecated ncdf package instead.
-------------------------------------------------------------------
ERROR: configuration failed for package ‘ncdf4’
* removing ‘/usr/local/R/lib64/R/library/ncdf4’