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.
>To: address@hidden >From: "Kuang-Shen Hsu" <address@hidden> >Subject: ncgen Error -- libc.2 not found >Organization: DOC/NOAA/NWS - National Weather Service >Keywords: 200206122115.g5CLFLJ27196 Hi, > I tried to run ncgen from HP UNIX machine and get the following error: > > [clifford]$ncgen TEX.cdl > /usr/lib/dld.sl: Can't open shared library: /usr/lib/libc.2 > /usr/lib/dld.sl: No such file or directory > Abort(coredump) > > The following are the contents in the lib directory: > > [clifford]$pwd > /fs/local/netcdf-3.5.0/HP/lib > [clifford]$ls > libnetcdf.a libnetcdf_c++.a > > Please can you tell me where I can get a copy of the libc.2 library. libc.2 is not a netCDF library, but a shared C runtime library that should be installed and found by default on your HP system. Try running the command: % ldd `which ncgen` to see where the shared libraries are being found for ncgen on your system. For example, when I build ncgen as a 64-bit executable on an HP system, I get: % ldd ncgen libc.2 => /usr/lib/pa20_64/libc.2 libdl.1 => /usr/lib/pa20_64/libdl.1 /opt/graphics/OpenGL/lib/pa20_64/libogltls.sl => /opt/graphics/OpenGL/lib/pa20_64/libogltls.sl which shows that libc.2 is found in /usr/lib/pa20_64/. ldd only works on 64-bit executables, so if ncgen is built as a 32-bit executable, I don't know how to find where it expects shared libraries to be. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu