ungrib.exe cannot open shared object file "libpng.so.0"

Having problems running the WRF Preprocessing System (WPS)?

ungrib.exe cannot open shared object file "libpng.so.0"

Postby mtchuang » Fri Mar 13, 2009 6:33 pm

Dear everyone:

I am dealing with a real-time forecasting research. The global data I used is from noaa's gfs prognostic data, gfs.t06z.pgrib2fXX. Also those three GRIB2 libraries : jasper, libpng, and zlib libraries, have been installed. Under the directory /WPS, after executing the configure (I choose 9), and compile, the three execution file geogrid.exee, ungrib.exe, and metgrid.exe are all generated. geogrid.exe is OK. However, when executing ungrib.exe, there is a error message as follows:

./ungrib.exe: error while loading shared libraries: libpng10.so.0: cannot open shared object file: No such file or directory

I could not find any script or program in which the path of libpng10.so.0 has been designated. Can anyone be helpful? I really appreciate.

Roger. Chuang
email: mtchuang100@gmail.com
mtchuang
 
Posts: 2
Joined: Sun Dec 07, 2008 9:25 pm

Re: ungrib.exe cannot open shared object file "libpng.so.0"

Postby ben » Wed Mar 18, 2009 11:55 am

with ldd you'll get a list of libraries that ungrib depends on.

Use:

ldd ungrib.exe

to see whether your libpng is listed. If not you'd have to set a path or environmental variable.

Ben.
ben
 
Posts: 13
Joined: Tue Jul 22, 2008 9:36 am

Re: ungrib.exe cannot open shared object file "libpng.so.0"

Postby khansingo » Wed May 15, 2013 1:58 am

Hi, I have a similar problem. I did ldd ungrib.exe and it is reporting that libpng16.so16 not found. What environment variables need to be set? Someone has a solution? My libpng libraries are installed in /usr/loca/lib.
khansingo
 
Posts: 2
Joined: Wed May 15, 2013 1:35 am

Re: ungrib.exe cannot open shared object file "libpng.so.0"

Postby kjharding » Thu Oct 03, 2013 12:24 pm

I encountered the same problem as well. Here's what you can do right before running ungrib. Do a "ldd ungrib.exe" to see which libraries are correctly linked.

Code: Select all
hardingk@node1084 [~/WRFV3.5.1/WPS] % ldd ungrib.exe
   linux-vdso.so.1 =>  (0x00007fffd21ff000)
   libpng16.so.16 => not found
   libz.so.1 => /lib64/libz.so.1 (0x00007f3c6261c000)
   libm.so.6 => /lib64/libm.so.6 (0x00007f3c62398000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3c6217b000)
   libc.so.6 => /lib64/libc.so.6 (0x00007f3c61de8000)
   libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3c61bd2000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f3c619ce000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f3c6284a000)


Depending on what shell you are in...

env LD_LIBRARY_PATH="lib png path"

or

export LD_LIBRARY_PATH="lib png path"

Now libpng is correctly linked...

Code: Select all
hardingk@node1084 [~/WRFV3.5.1/WPS] % ldd ungrib.exe
   linux-vdso.so.1 =>  (0x00007fffc81ff000)
   libpng16.so.16 => /home/snyderpk/hardingk/libpng-1.6.6/lib/libpng16.so.16 (0x00007f0161b89000)
   libz.so.1 => /lib64/libz.so.1 (0x00007f016195c000)
   libm.so.6 => /lib64/libm.so.6 (0x00007f01616d8000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f01614bb000)
   libc.so.6 => /lib64/libc.so.6 (0x00007f0161128000)
   libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0160f12000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f0160d0e000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f0161dbc000)


And then just run ./ungrib.exe.

http://stackoverflow.com/questions/5934 ... standard-l

Keith
kjharding
 
Posts: 7
Joined: Tue Sep 15, 2009 3:28 pm

Re: ungrib.exe cannot open shared object file "libpng.so.0"

Postby pegahfar_naf » Thu Jan 07, 2021 9:57 am

Thank you this help me so much.
pegahfar_naf
 
Posts: 21
Joined: Sat Sep 29, 2018 9:10 am


Return to Runtime Problems

Who is online

Users browsing this forum: No registered users and 2 guests