<p>This question will likely be deleted because there's too little information to answer it and it's really more a question for your cluster support/colleagues.  In the meantime...</p>
<p>The shared library <code>libnetcdf.so.11</code> isn't visible in the environment where you're executing the program.  This may be because,</p>
<ul>
<li>The cluster doesn't have <code>netcdf</code> installed in the default user environment</li>
<li>You don't have <code>netcdf</code> installed in the Conda environment you have active when you run the program (IIRC installing <code>cdsapi</code> doesn't install <code>netcdf</code> as a dependency)</li>
<li>You don't have the right Conda environment active when you run your program (people often miss this if they're submitting jobs to a cluster via SLURM, PBS, etc)</li>
<li>Your Conda environment contains a mixture of incompatible package versions (this can happen if you've been manually installing/updating individual packages)</li>
</ul>
<p>It's worth running things like <code>conda info</code> and <code>nc-config --all</code> at the start of your script to diagnose what the shell environment is at run time.</p>
<p>My install of NetCDF v4.8.1 comes with <code>libnetcdf.so.19</code>.  As your <code>grib_to_netcdf</code> is looking for <code>libnetcdf.so.11</code> I suspect that it was compiled against an earlier version of NetCDF, probably something like v4.4.  If you've compiled it yourself, you need to make sure the Conda environment is active when you do the the configure step so that it sees the correct version.  Even then you may need to tell configure more explicitly where to look for the correct NetCDF libraries.</p>

CC BY-SA 4.0
2024-01-19T10:16:37.507Z
2024-01-19T13:56:21.850Z
2024-01-19T13:56:21.850Z
Deditos
<p>I am trying to download <a href="https://atmosphere.copernicus.eu/" rel="nofollow noreferrer">CAMS</a> data from CDS and the error in the header is printed. If I understand well a necessary file is missing from my <a href="https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html" rel="nofollow noreferrer">conda</a> environment. (I am working in a cluster with CentOS 7).</p>
<p>nc-config --all</p>
<p>This netCDF 4.8.1 has been built with the following features:</p>
<p>--cc            -&gt; x86_64-conda-linux-gnu-cc
--cflags        -&gt; -I/mnt/..../ditsiaou/0203_385/0203_385/include
--libs          -&gt; -L/mnt/..../ditsiaou/0203_385/0203_385/lib -lnetcdf
--static        -&gt; -lmfhdf -ldf -lhdf5_hl -lhdf5 -lm -lcurl -lzip</p>
<p>--has-c++       -&gt; no
--cxx           -&gt;</p>
<p>--has-c++4      -&gt; no
--cxx4          -&gt;</p>
<p>--has-fortran   -&gt; yes
--fc            -&gt; /home/conda/feedstock_root/build_artifacts/netcdf-fortran_1674656969142/_build_env/bin/x86_64-conda-linux-gnu-gfortran
--fflags        -&gt; -I/mnt/..../ditsiaou/0203_385/0203_385/include -I/..../ditsiaou/0203_385/0203_385/include
--flibs         -&gt; -L/mnt/..../ditsiaou/0203_385/0203_385/lib -lnetcdff -lnetcdf -lnetcdf
--has-f90       -&gt; TRUE
--has-f03       -&gt; yes</p>
<p>--has-dap       -&gt; yes
--has-dap2      -&gt; yes
--has-dap4      -&gt; yes
--has-nc2       -&gt; yes
--has-nc4       -&gt; yes
--has-hdf5      -&gt; yes
--has-hdf4      -&gt; yes
--has-logging   -&gt; no
--has-pnetcdf   -&gt; no
--has-szlib     -&gt; no
--has-cdf5      -&gt; yes
--has-parallel4 -&gt; no
--has-parallel  -&gt; no
--has-nczarr    -&gt; yes</p>
<p>--prefix        -&gt; /mnt/..../ditsiaou/0203_385/0203_385
--includedir    -&gt; /mnt/..../ditsiaou/0203_385/0203_385/include
--libdir        -&gt; /mnt/..../ditsiaou/0203_385/0203_385/lib
--version       -&gt; netCDF 4.8.1</p>
<p>conda info</p>
<pre><code> active environment : /mnt/..../ditsiaou/0203_385/0203_385
active env location : /mnt/..../ditsiaou/0203_385/0203_385
        shell level : 1
   user config file : /home/d/ditsiaou/.condarc
</code></pre>
<p>populated config files : /home/d/ditsiaou/.condarc
conda version : 22.9.0
conda-build version : not installed
python version : 3.7.13.final.0
virtual packages : __linux=3.10.0=0
__glibc=2.17=0
__unix=0=0
__archspec=1=x86_64
base environment : /mnt/apps/..../linux-centos7-x86_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims  (read only)
conda av data dir : /mnt/apps/..../linux-centos7-x86_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims/etc/conda
conda av metadata url : None
channel URLs : <a href="https://repo.anaconda.com/pkgs/main/linux-64" rel="nofollow noreferrer">https://repo.anaconda.com/pkgs/main/linux-64</a>
<a href="https://repo.anaconda.com/pkgs/main/noarch" rel="nofollow noreferrer">https://repo.anaconda.com/pkgs/main/noarch</a>
<a href="https://repo.anaconda.com/pkgs/r/linux-64" rel="nofollow noreferrer">https://repo.anaconda.com/pkgs/r/linux-64</a>
<a href="https://repo.anaconda.com/pkgs/r/noarch" rel="nofollow noreferrer">https://repo.anaconda.com/pkgs/r/noarch</a>
package cache : /mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/pkgs
/mnt/..../ditsiaou/2023/conda_env/2309_385/2309_385/.conda/pkgs
/mnt/..../ditsiaou/models/280923v1/2609_385_intel/2609_385_intel/.conda/pkgs
/mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/pkgs/
/mnt/..../ditsiaou/0203_385/0203_385/.conda/pkgs
/mnt/..../ditsiaou/0203_385/0207_385_gcc730/.conda/pkgs
/mnt/..../ditsiaou/gcc_020223_py385/.conda/pkgs
/mnt/..../ditsiaou/intel_3101_py385/.conda/pkgs
envs directories : /mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/envs
/mnt/..../ditsiaou/2023/conda_env/2309_385/2309_385/.conda/envs
/mnt/..../ditsiaou/models/280923v1/2609_385_intel/2609_385_intel/.conda/envs
/mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/envs/
/mnt/..../ditsiaou/gcc_020223_py385/0203_385/.conda/envs
/mnt/..../ditsiaou/gcc_020223_py385/0207_385_gcc730/.conda/envs
/mnt/..../ditsiaou/gcc_020223_py385/.conda/envs
/home/d/ditsiaou/.conda/envs
/mnt/apps/..../linux-centos7-x86_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims/envs
platform : linux-64
user-agent : conda/22.9.0 requests/2.28.1 CPython/3.7.13 Linux/3.10.0-1160.105.1.el7.x86_64 centos/7.9.2009 glibc/2.17
UID:GID : 165170:2000
netrc file : None
offline mode : False</p>

<atmosphere-modelling>
grib_to_netcdf: error while loading shared libraries: libnetcdf.so.11: cannot open shared object file: No such file or directory
Dimitris Tsiaousidis
# grib_to_netcdf: error while loading shared libraries: libnetcdf.so.11: cannot open shared object file: No such file or directory

(Asked by: username_0 on 2024-01-13)

I am trying to download [CAMS](https://atmosphere.copernicus.eu/) data from CDS and the error in the header is printed. If I understand well a necessary file is missing from my [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) environment. (I am working in a cluster with CentOS 7).

nc-config --all

This netCDF 4.8.1 has been built with the following features:

--cc -> x86\_64-conda-linux-gnu-cc
--cflags -> -I/mnt/..../ditsiaou/0203\_385/0203\_385/include
--libs -> -L/mnt/..../ditsiaou/0203\_385/0203\_385/lib -lnetcdf
--static -> -lmfhdf -ldf -lhdf5\_hl -lhdf5 -lm -lcurl -lzip

--has-c++ -> no
--cxx ->

--has-c++4 -> no
--cxx4 ->

--has-fortran -> yes
--fc -> /home/conda/feedstock\_root/build\_artifacts/netcdf-fortran\_1674656969142/\_build\_env/bin/x86\_64-conda-linux-gnu-gfortran
--fflags -> -I/mnt/..../ditsiaou/0203\_385/0203\_385/include -I/..../ditsiaou/0203\_385/0203\_385/include
--flibs -> -L/mnt/..../ditsiaou/0203\_385/0203\_385/lib -lnetcdff -lnetcdf -lnetcdf
--has-f90 -> TRUE
--has-f03 -> yes

--has-dap -> yes
--has-dap2 -> yes
--has-dap4 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> yes
--has-logging -> no
--has-pnetcdf -> no
--has-szlib -> no
--has-cdf5 -> yes
--has-parallel4 -> no
--has-parallel -> no
--has-nczarr -> yes

--prefix -> /mnt/..../ditsiaou/0203\_385/0203\_385
--includedir -> /mnt/..../ditsiaou/0203\_385/0203\_385/include
--libdir -> /mnt/..../ditsiaou/0203\_385/0203\_385/lib
--version -> netCDF 4.8.1

conda info

```
 active environment : /mnt/..../ditsiaou/0203_385/0203_385
active env location : /mnt/..../ditsiaou/0203_385/0203_385
        shell level : 1
   user config file : /home/d/ditsiaou/.condarc

```

populated config files : /home/d/ditsiaou/.condarc
conda version : 22.9.0
conda-build version : not installed
python version : 3.7.13.final.0
virtual packages : \_\_linux=3.10.0=0
\_\_glibc=2.17=0
\_\_unix=0=0
\_\_archspec=1=x86\_64
base environment : /mnt/apps/..../linux-centos7-x86\_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims (read only)
conda av data dir : /mnt/apps/..../linux-centos7-x86\_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims/etc/conda
conda av metadata url : None
channel URLs : <https://repo.anaconda.com/pkgs/main/linux-64>
<https://repo.anaconda.com/pkgs/main/noarch>
<https://repo.anaconda.com/pkgs/r/linux-64>
<https://repo.anaconda.com/pkgs/r/noarch>
package cache : /mnt/..../ditsiaou/2609\_385\_intel/2609\_385\_intel/.conda/pkgs
/mnt/..../ditsiaou/2023/conda\_env/2309\_385/2309\_385/.conda/pkgs
/mnt/..../ditsiaou/models/280923v1/2609\_385\_intel/2609\_385\_intel/.conda/pkgs
/mnt/..../ditsiaou/2609\_385\_intel/2609\_385\_intel/.conda/pkgs/
/mnt/..../ditsiaou/0203\_385/0203\_385/.conda/pkgs
/mnt/..../ditsiaou/0203\_385/0207\_385\_gcc730/.conda/pkgs
/mnt/..../ditsiaou/gcc\_020223\_py385/.conda/pkgs
/mnt/..../ditsiaou/intel\_3101\_py385/.conda/pkgs
envs directories : /mnt/..../ditsiaou/2609\_385\_intel/2609\_385\_intel/.conda/envs
/mnt/..../ditsiaou/2023/conda\_env/2309\_385/2309\_385/.conda/envs
/mnt/..../ditsiaou/models/280923v1/2609\_385\_intel/2609\_385\_intel/.conda/envs
/mnt/..../ditsiaou/2609\_385\_intel/2609\_385\_intel/.conda/envs/
/mnt/..../ditsiaou/gcc\_020223\_py385/0203\_385/.conda/envs
/mnt/..../ditsiaou/gcc\_020223\_py385/0207\_385\_gcc730/.conda/envs
/mnt/..../ditsiaou/gcc\_020223\_py385/.conda/envs
/home/d/ditsiaou/.conda/envs
/mnt/apps/..../linux-centos7-x86\_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims/envs
platform : linux-64
user-agent : conda/22.9.0 requests/2.28.1 CPython/3.7.13 Linux/3.10.0-1160.105.1.el7.x86\_64 centos/7.9.2009 glibc/2.17
UID:GID : 165170:2000
netrc file : None
offline mode : False

**Tags:** atmosphere-modelling


---

## 1 answers

### Answer by username_1 on 2024-01-19. Score: 1

This question will likely be deleted because there's too little information to answer it and it's really more a question for your cluster support/colleagues. In the meantime...

The shared library `libnetcdf.so.11` isn't visible in the environment where you're executing the program. This may be because,

* The cluster doesn't have `netcdf` installed in the default user environment
* You don't have `netcdf` installed in the Conda environment you have active when you run the program (IIRC installing `cdsapi` doesn't install `netcdf` as a dependency)
* You don't have the right Conda environment active when you run your program (people often miss this if they're submitting jobs to a cluster via SLURM, PBS, etc)
* Your Conda environment contains a mixture of incompatible package versions (this can happen if you've been manually installing/updating individual packages)

It's worth running things like `conda info` and `nc-config --all` at the start of your script to diagnose what the shell environment is at run time.

My install of NetCDF v4.8.1 comes with `libnetcdf.so.19`. As your `grib_to_netcdf` is looking for `libnetcdf.so.11` I suspect that it was compiled against an earlier version of NetCDF, probably something like v4.4. If you've compiled it yourself, you need to make sure the Conda environment is active when you do the the configure step so that it sees the correct version. Even then you may need to tell configure more explicitly where to look for the correct NetCDF libraries.


---

