libnetcdf.so.7 error
libnetcdf.so.7 error
I have installed ROMS and netcdf 4.1.3 and have successfully run the Upwelling and Estuary Sediment Test cases. However, recently I started getting an error each time I try to execute ROMS, e.g.,
./oceanS < ocean_estuary_test.in > estuary.out &
Note, I get the same message trying to run the upwelling test now, specifically:
./oceanS error while loading shared libraries: libnetcdf.so.7:
cannot open shared object file: No such file or directory
the file libnetcdf.so.7 does appear in the netcdf/lib path and the size is 18B. Is the file possibly corrupt? Should I replace the file with a copy from my download source code or do I need to reinstall netcdf? Is there another possible cause and/or solution?
./oceanS < ocean_estuary_test.in > estuary.out &
Note, I get the same message trying to run the upwelling test now, specifically:
./oceanS error while loading shared libraries: libnetcdf.so.7:
cannot open shared object file: No such file or directory
the file libnetcdf.so.7 does appear in the netcdf/lib path and the size is 18B. Is the file possibly corrupt? Should I replace the file with a copy from my download source code or do I need to reinstall netcdf? Is there another possible cause and/or solution?
Re: libnetcdf.so.7 error
I don't know why it would have worked before, but one thing that can happen is that the model will link just fine, but at run time, the shared libraries need to be in directories in your LD_LIBRARY_PATH environment variable. Do you have that environment variable set? Does it include the directory with your netcdf library? The way to set it depends on what shell you are using.
Re: libnetcdf.so.7 error
Thank you Kate. Yes I run the command:
setenv LD_LIBRARY_PATH/$HOME/netcdf/lib
setenv LD_LIBRARY_PATH/$HOME/netcdf/lib
Re: libnetcdf.so.7 error
You need a space between LD_LIBRARY_PATH and the path that follows. You can check by typing "printenv LD_LIBRARY_PATH" to see that it's set correctly.jande023 wrote:Thank you Kate. Yes I run the command:
setenv LD_LIBRARY_PATH/$HOME/netcdf/lib
Re: libnetcdf.so.7 error
Feeling pretty silly. The space did the trick. Thank you.
-
- Posts: 13
- Joined: Tue Aug 04, 2015 4:42 pm
- Location: Universidad Del Mar
Re: libnetcdf.so.7 error
i have the same error when i try to run the scrip_test but with libnetcdff.so.6 i have this in my bash_profile:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export PATH=/opt/subversion/bin:$PATH
export CPPFLAGS="-I/usr/local/hdf5-1.8.13/include -I/usr/local/zlib-1.2.8/include -I/usr/local/netcdf.4.3.2/include"
export LDFLAGS="-L/usr/local/hdf5-1.8.13/lib -L/usr/local/zlib-1.2.8/lib -L/usr/local/netcdf.4.3.2/lib"
export LD_LIBRARY_PATH="/usr/local/hdf5-1.8.13/lib /usr/local/zlib-1.2.8/lib /usr/local/netcdf.4.3.2/lib"
export NETCDF=/usr/local/netcdf.4.3.2
export NETCDF_INCDIR=/usr/local/netcdf.4.3.2/include
export NETCDF_LIBDIR=/usr/local/netcdf.4.3.2/lib
export MCT_INCDIR=/usr/local/include
export MCT_LIBDIR=/usr/local/lib
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export PATH=/opt/subversion/bin:$PATH
export CPPFLAGS="-I/usr/local/hdf5-1.8.13/include -I/usr/local/zlib-1.2.8/include -I/usr/local/netcdf.4.3.2/include"
export LDFLAGS="-L/usr/local/hdf5-1.8.13/lib -L/usr/local/zlib-1.2.8/lib -L/usr/local/netcdf.4.3.2/lib"
export LD_LIBRARY_PATH="/usr/local/hdf5-1.8.13/lib /usr/local/zlib-1.2.8/lib /usr/local/netcdf.4.3.2/lib"
export NETCDF=/usr/local/netcdf.4.3.2
export NETCDF_INCDIR=/usr/local/netcdf.4.3.2/include
export NETCDF_LIBDIR=/usr/local/netcdf.4.3.2/lib
export MCT_INCDIR=/usr/local/include
export MCT_LIBDIR=/usr/local/lib
Re: libnetcdf.so.7 error
It's all about the spaces again. In this context, it should be colons instead as in your path:export LD_LIBRARY_PATH="/usr/local/hdf5-1.8.13/lib /usr/local/zlib-1.2.8/lib /usr/local/netcdf.4.3.2/lib"
export LD_LIBRARY_PATH="/usr/local/hdf5-1.8.13/lib:/usr/local/zlib-1.2.8/lib:/usr/local/netcdf.4.3.2/lib"
-
- Posts: 13
- Joined: Tue Aug 04, 2015 4:42 pm
- Location: Universidad Del Mar
Re: libnetcdf.so.7 error
i did this thaks and i think that this is solved, but when i run scrip_test showme that:
[michel@localhost SCRIP]$ ./scrip_test
&REMAP_INPUTS
FIELD_CHOICE= 2,
INTERP_FILE="rmp_T42_to_POP43_conserv.nc ",
OUTPUT_FILE="out_T42_to_POP43_conserv.nc ",
/
Error in netCDF: No such file or directory
[michel@localhost SCRIP]$ ./scrip_test
&REMAP_INPUTS
FIELD_CHOICE= 2,
INTERP_FILE="rmp_T42_to_POP43_conserv.nc ",
OUTPUT_FILE="out_T42_to_POP43_conserv.nc ",
/
Error in netCDF: No such file or directory
Re: libnetcdf.so.7 error
Then this becomes a question for some other forum. Is this scrip for setting up COAWST? Take it to the COAWST forum then. Do you think it has the file it can't find or did you not read the error message?
-
- Posts: 7
- Joined: Mon Dec 05, 2011 3:29 pm
- Location: Instituto de oceanolodia(IDO)
Re: libnetcdf.so.7 error
Hello everyone,
I have the same issue (error while loading shared libraries libnetcdf.so.7), and I made "export LD_LIBRARY_PATH=/usr/local/lib:$PATH" and the problem still remain.
I'm trying to run in a Rock Cluster.
Grettings
I have the same issue (error while loading shared libraries libnetcdf.so.7), and I made "export LD_LIBRARY_PATH=/usr/local/lib:$PATH" and the problem still remain.
I'm trying to run in a Rock Cluster.
Grettings