LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Error with Shared Libraries Even Though Libraries Exist (https://www.linuxquestions.org/questions/linux-software-2/error-with-shared-libraries-even-though-libraries-exist-4175730662/)

Mooncakes 11-07-2023 11:53 AM

Error with Shared Libraries Even Though Libraries Exist
 
Hello,

My system is RHEL 8.0 x86_64.

I installed software and after attempting to execute it I encountered the errors below:
  • error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    error
  • error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
    error

I uninstalled and reinstalled the libraries. I confirmed the files do exist in both /usr/lib and /usr/lib64. After setting the LD_LIBRARY_PATH to /usr/lib:/usr/lib64, the error changed to the following errors:
  • error while loading shared libraries: libc.so.6: wrong ELF class: ELFCLASS32
  • error while loading shared libraries: libdl.so.2: wrong ELF class: ELFCLASS64

I tried running the software in a 32-bit VM, but encountered the same error.

Any thoughts on how to fix this issue?

pan64 11-07-2023 01:08 PM

what software is it? I guess it is a 32/64 bit mismatch

Mooncakes 11-07-2023 02:36 PM

I took a look at the environment file and it's supposed to be able to run on both 32 and 64-bit operating systems. I also tried to run it separately on 32 and 64-bit systems and encountered the same error.

pan64 11-07-2023 03:33 PM

the usual way to test is to run:
ldd <binary executable>

sundialsvcs 11-07-2023 07:12 PM

Also: the Linux loader uses a cache file to quickly enable it to locate libraries. (Linux has a fairly complicated way of allowing applications to specify the libraries that they need, so this avoids "filesystem searching each time.") As root, run the ldconfig command to rebuild this cache and see if the problem goes away. (Installation scripts usually run this command for you.)


All times are GMT -5. The time now is 04:49 PM.