2

I've install a program in Centos 6.8, While running the program, I receive error "error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory" when I checked the linked library to the program using ldd command, I can see libm.so.6 with correct 64bit "libm.so.6 => /lib64/libm.so.6 (0x0000003a19000000)" That means, library is installed and already added in environment variable, LD_LIBRARY_PATH Another program, which uses libm.so.6, works fine. Can anyone help to solve this problem ? Thanks

Sunil Parmar
  • 21
  • 1
  • 3

1 Answers1

2

In programming, details matter.

Lets say, The program which I am trying to run is ABC and install

This is not details, this is a hypothetical. If you want useful answers, you should supply actual details that you are asked for. In particular, edit your question (instead of commenting on a different useless answer), and do this: "show the ldd command you actually ran, and its actual output."

That said, if ldd /usr/local/ABC/bin/ABC really does show libm.so.6 => /lib64/libm.so.6, then there is no way for ABC to not find libm.so.6.

Therefore we must conclude that ABC invokes some other program, and that program fails to find libm.so.6. You can confirm this guess by running:

LD_DEBUG=files,libs /usr/local/ABC/bin/ABC

This will show that ABC does find libm.so.6, what other program it invokes, and where that other program looks for libm.so.6.

It is likely that the other program is 32-bit, and looks for /lib/libm.so.6, and that you don't have 32-bit runtime libraries installed.

You can install them with yum install glibc.i686 or some such.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362