error: cannot find netcdf header
Command-line operators for netCDF and HDF files
Brought to you by:
zender
While following the Cygwin installation/configuration instructions exactly, I keep getting a persistent "error: cannot find netcdf header" after running
or after running "
$ CPPFLAGS='-UNEED_NC_INQ_FORMAT' ./configure -prefix='/usr/local/nco' \
-disable-shared CFLAGS='-fPIC' \
NETCDF_INC=/usr/local/netcdf/include \
NETCDF_LIB=/usr/local/netcdf/lib
" as suggested in a previous support thread.
Really hoping to get some help here, feeling quite lost at the moment.
I also want to mention that the guide does not specify to install wget, but I had to install it as a pre-req separately, so that should probably be noted in the manual.
Thanks for your time.
Xavier
Typo: I ran "$ ./configure --prefix=/usr/local" first before the longer command pasted into my previous post.
Also "bonobo"
Last edit: Xavier Nogueira 2021-12-09
Building NCO on Windows is not a task a beginner should expect to complete quickly. The easiest way to install NCO on Windows is, as stated on the homepage, via Anaconda. I suggest you try that. In any case, I do not have a Windows machine that could reproduce your issue. You also might try rearranging your command above to:
Tried the command but it didn't work. I actually started with conda as it seemed much easier but at first installed to a non-base env, which worked but I could not figure out how to access the commands. I then tried to install to the base env but the install found not "solve the environment" leading to endless loading.
So I guess do you know if it's possible to use nco when installed to a non-base conda env, because if so i already have it?
Thanks :) Sorry to be that annoying Windows guy.
I know that many people use Conda NCO on Windows. Unfortunately, I do not know exactly how they do it. I still think that is the best option, so maybe ask on a Conda forum or StackOverflow?
All is good! I got it to work.
Thanks