Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rank-math domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u763016847/domains/golinuxhub.com/public_html/wp-includes/functions.php on line 6114
Fix "error while loading shared libraries *:No such file or directory" - GoLinuxHub

Fix "error while loading shared libraries *:No such file or directory"

It happens many time when you are trying to execute some command an error pops out like
the one shown below
error while loading shared libraries: libacl.so: cannot open shared object file: No such file or directory

It happened to me when I was working on HP-UX machine but it can happen in any Linux machine as well. I had to search alot to overcome this issue but finally i got one solution which I will upload here.

It is not related with this particular library file. This is something with defining the shared library path variable.

These are the steps you need to follow to fix this issue:

In Linux/Unix machine

# find / -name "library file name" -type f

# find -name libacl.so -type f
/usr/lib

So now once you get the location of the directory

# export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH

This command is session dependent so if you change the terminal or session again you might face the same issue so it is better to make permanent changes.

# vi /root/.bash_profile
export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
#. /root/.bash_profile

This will update your machine with the new variables as defined in .bash_profile

Now what if you DON'T get any match for that library file in your machine. In that case you will have to download the rpm file responsible for the installation of that library file.

NOTE: This command is tested on RedHat and CentOS

Here is what you need to do

# yum whatprovides libacl.so
libacl-devel-2.2.49-6.el6.i686 : Access control list static libraries and
: headers
Repo : base
Matched from:
Filename : /usr/lib/libacl.so
Filename :
/lib/libacl.so

Now once you find the rpm file you can install it in your machine using yum

# yum -y install libacl-devel

In HP-UX machine

You need to follow the same step except for the shared library location where you will save the path

# export SHLIB_PATH=/usr/lib:$SHLIB_PATH
Update the same in your .bash_profile for making permanent changes.