I am trying to install HEREMS following the guide(https://earth.bsc.es/gitlab/es/hermesv3_gr/-/wikis/user_guide_how_to_install_conda), which has a dependency on ESMF. After installing ESMF via Conda, I encounter the error that it can’t find libnetcdff.so.7 when I attempting to run HEREMS
However, I have verified that the file libnetcdff.so.7 is present in my lib directory
Despite this, when I use ldd on libesmf_fullylinked.so, the libraries are still reported as “not found,” even though libnetcdf.so.18 and libnetcdff.so.7 are indeed present in my lib directory.
following is the bug report:
when I run HERMES with this command:
hermesv3_gr -c '/public/home/students2/mxy/HEREMES/hermesv3_gr-master/HERMES_IN/conf/hermes.conf'
It tells:
File "/public/home/students2/mxy/conda/envs/new_env/lib/python3.8/site-packages/ESMF/interface/loadESMF.py", line 127, in <module>
_ESMF = ct.CDLL(os.path.join(libsdir,'libesmf_fullylinked.so'),
File "/public/home/students2/mxy/conda/envs/new_env/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libnetcdff.so.7: cannot open shared object file: No such file or directory
when I check the l libesmf_fullylinked.so
ldd $CONDA_PREFIX/lib/libesmf_fullylinked.so
linux-vdso.so.1 => (0x00007ffd275c7000)
libmpifort.so.12 => /public/home/students2/mxy/conda/envs/new_env/lib/./libmpifort.so.12 (0x00002b88cbe93000)
librt.so.1 => /lib64/librt.so.1 (0x00002b88cd905000)
libgfortran.so.4 => /public/home/students2/mxy/conda/envs/new_env/lib/./libgfortran.so.4 (0x00002b88cbf01000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b88cdb0d000)
libnetcdff.so.7 => not found
libnetcdf.so.18 => not found
libmpicxx.so.12 => /public/home/students2/mxy/conda/envs/new_env/lib/./libmpicxx.so.12 (0x00002b88cc031000)
libmpi.so.12 => /public/home/students2/mxy/conda/envs/new_env/lib/./libmpi.so.12 (0x00002b88cdd11000)
libstdc++.so.6 => /public/home/students2/mxy/conda/envs/new_env/lib/./libstdc++.so.6 (0x00002b88ce036000)
libm.so.6 => /lib64/libm.so.6 (0x00002b88ce1aa000)
libgomp.so.1 => /public/home/students2/mxy/conda/envs/new_env/lib/./libgomp.so.1 (0x00002b88ce4ac000)
libgcc_s.so.1 => /public/home/students2/mxy/conda/envs/new_env/lib/./libgcc_s.so.1 (0x00002b88cc051000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b88ce4f0000)
libc.so.6 => /lib64/libc.so.6 (0x00002b88ce70c000)
libquadmath.so.0 => /public/home/students2/mxy/conda/envs/new_env/lib/././libquadmath.so.0 (0x00002b88cead9000)
/lib64/ld-linux-x86-64.so.2 (0x00002b88cbe6f000)
My libs directory:
ls /public/home/students2/mxy/conda/envs/new_env/lib/libnetcdff*
/public/home/students2/mxy/conda/envs/new_env/lib/libnetcdff.settings
/public/home/students2/mxy/conda/envs/new_env/lib/libnetcdff.so
/public/home/students2/mxy/conda/envs/new_env/lib/libnetcdff.so.7
/public/home/students2/mxy/conda/envs/new_env/lib/libnetcdff.so.7.0
Here are the steps I have tried to resolve the issue:
Editing the ESMF make file to adjust library paths.
Modifying environment variables such as LD_LIBRARY_PATH and ESMF_NETCDF_LIBPATH in .bashrc.
export LD_LIBRARY_PATH=/public/home/students2/mxy/conda/envs/new_env/lib:$LD_LIBRARY_PATH
Reinstalling both ESMF and NetCDF multiple times.(from https://anaconda.org/conda-forge/conda-package-handling/files)
None of these actions have resolved the issue.
Thank you for any assistance you can provide!
Shinra Kanzaki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5