I was on CentOS 7.3 on x86_64 using perf compiled on the system itself from Kernel 4.13.7 source. It worked without any issue and was able to profile whichever application I wanted to.

For some reason, system crashed and I had to re-configure it. I am back on CentOS 7.3 with same kernel as it was before i.e. 3.10. Now, when I downloaded Kernel 4.13.7 and compiled perf, it gives me following error when I try to profile any benchmark.

error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

As far as I understand, this library belongs to omp or mkl which I don't need for perf and is not present on my system. As per different forums and search, it also seems that this library should come with Intel MKL, which is already configured on my system, but for sure system doesn't have this specific library.

To debug more, I have another spare system with RHEL 6.9. On this system too compiling perf as I did for system described above and then profiling same benchmarks gives me same library error.

I am clueless as to why this error is coming up now and wasn't there earlier before re-installing the operation system. I have updated the OS with all the latest packages.

I don't get this error when I run benchmark standalone (whether CentOS or RHEL) or with numactl, and benchmarks do run-terminate successfully.

Any suggestion why this may be happening?

  • Do you have a libiomp5.so? Can you do a ls -ld on it and post the output here? Please do not respond in comments; edit your question to make it clearer and more complete. Commented Oct 17, 2017 at 2:14
  • @Scott - ls -ld on which binary? Earlier, when I used perf for profiling benchmark, it never gave this library error. Commented Oct 17, 2017 at 3:02
  • (1) libiomp5.so.  If it exists, it will probably be somewhere like /lib or /usr/lib, and will probably be in a path whose name ends with …/lib.  If you can't find it, do find / -name "libiomp5.so*" -ls.  (2) So, are you saying that perf worked before on this same computer?  You should clarify things like that in your question. Commented Oct 17, 2017 at 3:53
  • @Scott - I agree, I should have provided more information. Please check rephrased question. If you can suggest any solution, it will be helpful. Commented Oct 17, 2017 at 17:07

1 Answer 1


I solved this issue by re-installing Intel Parallel Studio XE which configures different performance library that I need. New install also configured libiomp5.so library, which wasn't configured with earlier install.

Then adding path to this library in /etc/ld.so.conf and running sudo ldconfig solved the issue.

Hopefully, this helps someone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .