Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

libnetcdff.so.5: cannot open shared object file

enesbrnci

New member
Dear all,

I get the following error while running ./real.exe.

Could you please help?

./real.exe: error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory

Thank you in advance,

Enes B.
 
Dear all,

I get the following error while running ./real.exe.

Could you please help?

./real.exe: error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory

Thank you in advance,

Enes B.
Hello @enesbrnci

This error typically occurs when the path to the NETCDF folder is not added properly to the $PATH and $LD_LIBRARY_PATH

export LD_LIBRARY_PATH=path/to/folder/containing/NETCDF/lib:$LD_LIBRARY_PATH
export PATH=path/to/folder/containing/NETCDF/$PATH
 
Thank you for your prompt reply,

I tried the above export commands under WRF run directory but got the same error.
 
@enesbrnci
I'm assuming what happened is that you built WRF with a particular version of netcdf that included the library file libnetcdff.so.5, and perhaps now your system or cluster has been updated and pointing to a newer version of netcdf. So when real.exe is running and trying to access the libraries it was compiled with, it's not able to find those. Are you able to set the path to the older version of the libraries? If they no longer exist, try recompiling WRF with the new netcdf.
 
As you mentioned, we found that version of the NetCDF was an issue. It is solved after setting the path correctly.
Thank you all for your valuable support.
 
The Unix operating system usually looks at the environment variable LD_LIBRARY_PATH to search the directories in the path for the library. Try issuing these commands:

echo $LD_LIBRARY_PATH

If the path /usr/local/netcdf/lib is not included, then (in ksh, for example) please type:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/netcdf/lib"
 
PATH was configured correctly, but when I checked the existence of libnetcdff.so.5 in the installed path, I was sure that it was a version problem because there was no existence.
 
Top