(RESOLVED) error while loading shared libraries: libpng12.so.0:

Topics related to running the ungrib.exe program
Post Reply
sdhamilton
Posts: 10
Joined: Sat Sep 01, 2018 12:37 am

(RESOLVED) error while loading shared libraries: libpng12.so.0:

Post by sdhamilton » Tue Sep 04, 2018 5:11 pm

Hello!

I am trying to set up WRF V4 on Ubuntu 18.04.1. WRF compiled successfully and it seemed like WPS build all the executables, since they appeared and are not zero-sized, but the compile log (attached) didn't end with a message about executables being successfully built. Geogrid runs successfully but when I try to run ungrib I get this error message:

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

However, as far as I can tell that file does exists, in /Build_WRF/LIBRARIES/grib2/lib/libpng12.so.0 .

Thank you so much!

Sofia
Attachments
log.compile
(108.44 KiB) Downloaded 62 times

kwerner
Posts: 2341
Joined: Wed Feb 14, 2018 9:21 pm

Re: Issue with ungrib

Post by kwerner » Tue Sep 04, 2018 7:09 pm

Hi,
Can you please issue the following in your /Build_WRF/LIBRARIES/grib2/lib/ directory:

ls -ls >& lib.txt

Please send that lib.txt file, and attach your configure.wps file, as well. Thanks!
NCAR/MMM

sdhamilton
Posts: 10
Joined: Sat Sep 01, 2018 12:37 am

Re: Issue with ungrib

Post by sdhamilton » Tue Sep 04, 2018 7:56 pm

Here those are, thank you!
Attachments
lib.txt
(1.21 KiB) Downloaded 85 times
configure.wps
(3.63 KiB) Downloaded 63 times

kwerner
Posts: 2341
Joined: Wed Feb 14, 2018 9:21 pm

Re: Issue with ungrib

Post by kwerner » Tue Sep 04, 2018 9:08 pm

Thanks for sending those. Okay, it's likely that you need to set the ungrib libraries in your LD_LIBRARY_PATH. For example, if using csh:

setenv LD_LIBRARY_PATH full_path_to_libraries/Build_WRF/LIBRARIES/grib2/lib:$LD_LIBRARY_PATH

and then ungrib should be able to locate the necessary libraries to run. Let me know if that works. Thanks!
NCAR/MMM

sdhamilton
Posts: 10
Joined: Sat Sep 01, 2018 12:37 am

Re: Issue with ungrib

Post by sdhamilton » Tue Sep 04, 2018 9:36 pm

When I try that I get this error:

% setenv LD_LIBRARY_PATH /home/jose/WRF/Build_WRF/LIBRARIES/grib2/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH: Undefined variable.


Thanks again for your help!

kwerner
Posts: 2341
Joined: Wed Feb 14, 2018 9:21 pm

Re: Issue with ungrib

Post by kwerner » Tue Sep 04, 2018 9:43 pm

Okay, then try it without the LD_LIBRARY_PATH on the end. That was just assuming that you already had that path set. i.e.,
setenv LD_LIBRARY_PATH full_path_to_libraries/Build_WRF/LIBRARIES/grib2/lib
NCAR/MMM

sdhamilton
Posts: 10
Joined: Sat Sep 01, 2018 12:37 am

Re: Issue with ungrib

Post by sdhamilton » Tue Sep 04, 2018 9:53 pm

Ah, ok. That worked this time, and now ungrib runs!

Thank you so much!!

Sofia

kwerner
Posts: 2341
Joined: Wed Feb 14, 2018 9:21 pm

Re: Issue with ungrib

Post by kwerner » Tue Sep 04, 2018 10:17 pm

Great! Thanks for letting me know.
NCAR/MMM

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: (RESOLVED) error while loading shared libraries: libpng12.so.0:

Post by Jayanti pal » Thu Nov 12, 2020 4:05 pm

I have faced the same issue, So I set as you instructed
export LD_LIBRARY_PATH=$DIR/grib2/lig:$LD_LIBRARY_PATH
but after setting this I face problem with gedit.
where I tried to any file to edit with this editor (gedit) it shows:

gedit: /home/oem/BUILD_WRF/LIBRARIES/grib2/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /lib/x86_64-linux-gnu/libpng16.so.16)

I have already install zlib-1.2.7
I have update and upgrade but it still shows the same.
Kindly help

kwerner
Posts: 2341
Joined: Wed Feb 14, 2018 9:21 pm

Re: (RESOLVED) error while loading shared libraries: libpng12.so.0:

Post by kwerner » Thu Nov 12, 2020 8:51 pm

@Jayanti,
The error you are seeing is specifically related to the gedit program. You should check with your systems administrator to see what is going wrong. It may be that gedit was built with a different version of the zlib library, but that's just a guess. Your systems administrator would know best about the libraries and programs on your system.
NCAR/MMM

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: (RESOLVED) error while loading shared libraries: libpng12.so.0:

Post by Jayanti pal » Fri Nov 13, 2020 10:57 am

Thank you for reply.
I will check it.

mapt66
Posts: 1
Joined: Sun May 02, 2021 11:25 am

Re: (RESOLVED) error while loading shared libraries: libpng12.so.0:

Post by mapt66 » Sun May 02, 2021 11:31 am

kwerner wrote:
Thu Nov 12, 2020 8:51 pm
@Jayanti,
The error you are seeing is specifically related to the gedit program. You should check with your systems administrator to see what is going wrong. It may be that gedit was built with a different version of the zlib library, but that's just a guess. Your systems administrator would know best about the libraries and programs on your system.
the problem is not the gedit . It's related to the path defined in the bashrc , because gedit , nautilus and other programs also have acess to the LIBRAY_PATH , so if you change the path to libpng12.so.0 , it will change for all programs . I'm trying resolve this problem and i let you know if i'm able to do it

Erroba
Posts: 1
Joined: Tue Aug 07, 2018 7:24 pm

Re: (RESOLVED) error while loading shared libraries: libpng12.so.0:

Post by Erroba » Fri Jul 23, 2021 11:43 pm

mapt66 wrote:
Sun May 02, 2021 11:31 am
kwerner wrote:
Thu Nov 12, 2020 8:51 pm
@Jayanti,
The error you are seeing is specifically related to the gedit program. You should check with your systems administrator to see what is going wrong. It may be that gedit was built with a different version of the zlib library, but that's just a guess. Your systems administrator would know best about the libraries and programs on your system.
the problem is not the gedit . It's related to the path defined in the bashrc , because gedit , nautilus and other programs also have acess to the LIBRAY_PATH , so if you change the path to libpng12.so.0 , it will change for all programs . I'm trying resolve this problem and i let you know if i'm able to do it
Did you solved this? I am having the same problem. Thanks in advance.

Post Reply

Return to “ungrib”