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.
Hello Jacob, The reason the old version is being picked up at runtime is likely because the linker is finding the older library first. You might be able to override this by specifying LD_LIBRARY_PATH=/home/jhedeliu/wrf/ver3_7/hdf5-1.8.15/hdf/lib at runtime. If your program were called 'foo', you would do this as follows: $ LD_LIBRARY_PATH=/home/jhedeliu/wrf/ver3_7/hdf5-1.8.15/hdf/lib ./foo Alternatively, you could do this as an environmental variable, but I would strongly suggest that you not do it as a global/persistent setting; this could cause problems for other programs. Another alternative, if this does not work, would be to rebuild hdf5-1.8.15 and disable the shared library, leaving only the static library. You would do this by passing '--disable-shared' to the 'configure' script packaged with hdf5-1.8.15. This way, netcdf would link against the static library when built, and would not seek out a shared libhdf5 at runtime. I hope this helps, -Ward > Hi support, > > I am trying to install netCDF so I can use WRF-CHEM. I have tried several > times to install netCDF but it keeps failing. I am following the > instructions here: > http://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html > except I have changed the directory paths to my home folders (I am > installing on a cluster and do not have permission to edit inside the usr > directory). > > I can see that the netCDF installation keeps failing because an older > version of HDF5 is being used instead of the one I installed. I have > LDFLAGS and CPPFLAGS set as environmental variables. I think I installed > HDF5-1.8.15 correctly because there are files in the bin directory. > > Do you know why the older version of HDF5 is being used when I have > LDFLAGS=-L/home/jhedeliu/wrf/ver3_7/hdf5-1.8.15/hdf/lib and > CPPFLAGS=-I/home/jhedeliu/wrf/ver3_7/hdf5-1.8.15/hdf/include ? > > Thanks for your help, > > Jacob > > -- > Jacob Hedelius > *Graduate Student, Chemistry* > California Institute of Technology > Phone: (626)-395-2059 > Email: address@hidden > 1200 E. California Blvd., MC 131-24 > Pasadena CA 91125 > > Ticket Details =================== Ticket ID: VHG-516000 Department: Support netCDF Priority: Normal Status: Closed