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

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

sdhamilton

New member
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.4 KB · Views: 162
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!
 
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!
 
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!
 
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
 
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
 
@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.
 
kwerner said:
@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
 
mapt66 said:
kwerner said:
@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.
 
Top