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.
Hi Marisol, > I'm trying to install the NETCDF libraries in my machine. But, when I > run make ("sudo make") it sends me an error message: > > make[2]: se ingresa al directorio > `/home/marisol/comprimidos/netcdf-4.0.1/cxx' > source='netcdf.cpp' object='netcdf.lo' libtool=yes \ > DEPDIR=.deps depmode=none /bin/bash ../depcomp \ > /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. > -I.. -I../fortran -I../libsrc -c -o netcdf.lo netcdf.cpp > libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../fortran -I../libsrc > -c netcdf.cpp > ../libtool: línea 981: g++: orden no encontrada > make[2]: *** [netcdf.lo] Error 1 > make[2]: se sale del directorio `/home/marisol/comprimidos/netcdf-4.0.1/cxx' > make[1]: *** [all-recursive] Error 1 > make[1]: se sale del directorio `/home/marisol/comprimidos/netcdf-4.0.1' > make: *** [all] Error 2 > > The system is Ubuntu running gfortran > > I set up the environment with: > > export CC='/usr/bin/gcc -Df2cFortran' > export PERL='usr/bin/perl' > export CPPFLAGS='-DNDEBUG -DpgiFortran' > export CFLAGS='-O -fno-builtin' > > sudo ./configure --prefix=/usr/local It is trying to build a C++ interface to netCDF, but it can't find the g++ compiler to compile the C++ file cxx/netcdf.cpp. I recommend that you run "make distclean", then run the configure command again, specifying the --disable-cxx option to tell it not to try to build the C++ interface. Most users and other applications only use the C or Fortran interfaces, and no other Unidata programs use the netCDF C++ interface. If you still want a C++ interface to netCDF, you should set the environment variable CXX and CXXFLAGS appropriately, before running configure again. Maybe you will have to install g++ or some other C++ compiler first. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: VUY-950551 Department: Support netCDF Priority: Normal Status: Closed