• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • 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

    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 :

    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.

    Follow the below links for more tutorials

    Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    How to configure Samba 4 Secondary Domain Controller
    How to secure Apache web server in Linux using password (.htaccess)
    How to register Red Hat Linux with RHN (Red Hat Network )
    Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
    15 tips to enhance security of your Linux machine
    Why is Linux more secure than windows and any other OS
    What is the difference between "su" and "su -" in Linux?
    What is swappiness and how do we change its value?
    How to log iptables messages in different log file
    What are the s and k scripts in the etc rcx.d directories
    How to check all the currently running services in Linux
    How to auto start service after reboot in Linux
    What is virtual memory, paging and swap space?

    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?

    Become an author and be a part of our GoLinuxHub Team, Click here for more information
    Fix "error while loading shared libraries *:No such file or directory" Fix "error while loading shared libraries *:No such file or directory" Reviewed by Deepak Prasad on Sunday, March 02, 2014 Rating: 5

    No comments:

    Powered by Blogger.