Friday, May 3, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 635  / 2 Years ago, sun, march 27, 2022, 11:46:17

I want to install and run SURFEX on Ubuntu 18.04, so I'm following the steps explained here. when I run the make command in the src directory (compiling the master version of the code), after a while I get an error that says:


configure: error: Could not link to netcdf C library. Please set LDFLAGS; for static builds set LIBS to the results of nc-config --libs.

I tried this solution in the step before "make", i.e.


CFLAGS=$(nc-config --cflags) LDFLAGS=$(nc-config --libs) ./configure

and


CFLAGS=$(nc-config --cflags) LDFLAGS=$(nc-config --libs) . ../conf/profile_surfex-LXgfortran-SFX-V8-1-1-MPIAUTO-O2-X0

but I couldn't resolve the problem, probably because I don't know what I am doing. Could someone tell me how I set those flags?


More From » software-installation

 Answers
4

I faced the same problem with Ubuntu 20.04 and this solution of theWrongAlice did the trick for me as well.


Installing libcurl4-gnutls-dev:


sudo apt-get install -y libcurl4-gnutls-dev


And before make:


CFLAGS=$(nc-config --cflags) LDFLAGS=$(nc-config --libs) ./configure


[#1003] Sunday, March 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ateact

Total Points: 176
Total Questions: 130
Total Answers: 122

Location: Egypt
Member since Sun, Apr 23, 2023
1 Year ago
ateact questions
;