This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Li Xuanli, > To: <address@hidden> > From: <address@hidden> > Subject: help,I cannot install netcdf > Organization: UCAR/Unidata The above message contained the following: > I need your help.I have trouble on installing netcdf.The following > is output of my computer. > $uname -a : > Linux daqi3 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux > > c,c++,fortran compiler directory: > /usr/bin/c89,cc,c++,g++,gcc > /usr/pgi/linux86/bin/pgf90 > > configure.log: > loading cache ./config.cache > checking for top-level source-directory /usr/local/netcdf-3.5.0/src > checking for m4 preprocessor > checking for m4... (cached) m4 > checking m4 flags... -B10000 > checking for xlc... (cached) c89 > checking C compiler "c89"... works > checking how to make dependencies... false > checking for CC... no > checking for cxx... no > checking for c++... c++ > checking C++ compiler "c++"... checking for g++... g++ > checking C++ compiler "g++"... checking for gcc... gcc > checking C++ compiler "gcc"... checking how to run the C preprocessor... > (cached) c89 -E > checking for f77... (cached) f77 > checking for Fortran .F compiler... > checking if Fortran-77 compiler handles *.F files... yes > checking "f77" as Fortran-90 compiler... failed to build test program > checking for xlf90... no > checking for f90... no It appears from the above that the environment variables CC, FC, F90, and CXX were not properly set to the absolute pathnames of the C, Fortran-77, Fortran-90, and C++ compilers, respectively, before the configure script was executed. My advice is to start over: 1. Go to the top-level source directory. 2. Perform steps 3 through 5 described near the end of the file INSTALL.html. 3. Ensure that environment variables are appropriately set. The file "INSTALL.html" contains an example for building the netCDF package on a Linux system using the pgf90 Fortran compiler. Use something like export CC=/usr/bin/gcc export CPPFLAGS='-DNDEBUG -DpgiFortran' export CFLAGS=-O export FC=/opt/pgi/linux86/bin/pgf90 export FFLAGS='-O -w' export CXX=/usr/bin/g++ or setenv CC /usr/bin/gcc setenv CPPFLAGS '-DNDEBUG -DpgiFortran' setenv CFLAGS -O setenv FC /opt/pgi/linux86/bin/pgf90 setenv FFLAGS '-O -w' setenv CXX /usr/bin/g++ depending on your user-shell. 5. Perform steps 6 through 9 described near the end of the file INSTALL.html. Regards, Steve Emmerson