我试过安装ncdf4软件包。我有R版本3.1.1。
问题似乎在于找到nc-config。如果我搜索这个特定的问题,那么我会发现有同样问题的人,他们通过在安装libnetcdf-dev之前安装Debian软件包ncdf4来解决这个问题。
我已经安装了那个包,但我一直有同样的问题,
错误如下:
checking for nc-config... no
-----------------------------------------------------------------------------------
Error, nc-config not found or not executable. This is a script that comes with the netcdf library, version 4.1-beta2 or later, and must be present for configuration to succeed.发布于 2017-07-14 21:49:17
正如评论中提到的@PaulHiemstra,查找nc-config的位置:
你能做的就是打开一个新的终端并做
which nc-config。这将显示文件在系统中的实际位置。如果确实安装了这个文件,问题可能是Linux将它安装在给定的位置,而R希望它在其他地方安装(例如/usr/local/bin vs /usr/bin )。您可以尝试通过将包含nc-config的库添加到PATH环境变量中来解决此问题。或者问题可能是不相关的,例如32位对64位。
对我来说,这就是:
ubuntu@dark-horse:~$ which nc-config
/home/ubuntu/miniconda3/bin/nc-config首先,使用以下命令安装netcdf要点
sudo apt-get install r-cran-ncdf4上面的命令应该已经安装了not,如果不尝试的话:
sudo apt-get install netcdf-bin现在,下载netcdf4源代码
wget http://cirrus.ucsd.edu/~pierce/ncdf/ncdf4_1.13.tar.gz现在,尝试进行安装。
sudo R CMD INSTALL ncdf4_1.13.tar.gz --configure-args="--with-nc-config=/home/ubuntu/miniconda3/bin/nc-config"发布于 2018-07-10 19:30:13
我有一个类似的问题,这些答案对我来说不太管用(Ubuntu16.04.4LTS)。
我不得不使用以下方法安装开发人员版本:
sudo apt-get install libnetcdf-dev发布于 2018-01-22 14:06:50
在CentOS 7上,在终端中使用sudo yum install netcdf-devel.x86_64完成了这个任务。
https://stackoverflow.com/questions/42891050
复制相似问题