Install ncdf4 package: Error, nc-config not found or not executable

Santiago I. Hurtado picture Santiago I. Hurtado · Mar 19, 2017 · Viewed 11.4k times · Source

I have tried to install ncdf4 package. I have R version 3.1.1.

The problem seems to be finding the nc-config. If I Google for this specific problem, then I find people with the same problem, who solved it by installing the Debian package libnetcdf-dev before installing ncdf4.

I already installed that package but I keep having the same problem,

The error is as follows:

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.

Answer

Oatman picture Oatman · Jul 10, 2018

I was having a similar problem and these answers didn't quite work for me (Ubuntu 16.04.4 LTS).

I had to install the developer version using:

sudo apt-get install libnetcdf-dev