Home > Blockchain >  OSError: libclangFrontend.so.5: cannot open shared object file: No such file or directory
OSError: libclangFrontend.so.5: cannot open shared object file: No such file or directory

Time:02-23

I am running bcc-tools on cent os 7. I have taken all the steps available on google:

  1. set LD_LIBRARY_PATH
  2. the one available here: https://blogs.oracle.com/linux/post/intro-to-bcc-2
  3. llvmtoolset is already installed

I just want to run bcc-tools on this machine. But this error doesn't want to go. Can anyone please guide me what else should I do to resolve this?

   [root@node1 tools]# ./tcptracer
    Traceback (most recent call last):
      File "./tcptracer", line 18, in <module>
        from bcc import BPF
      File "/usr/lib/python2.7/site-packages/bcc/__init__.py", line 27, in <module>
        from .libbcc import lib, bcc_symbol, bcc_symbol_option, bcc_stacktrace_build_id, _SYM_CB_TYPE
      File "/usr/lib/python2.7/site-packages/bcc/libbcc.py", line 17, in <module>
        lib = ct.CDLL("libbcc.so.0", use_errno=True)
      File "/usr/lib64/python2.7/ctypes/__init__.py", line 360, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: libclangFrontend.so.5: cannot open shared object file: No such file or directory

CodePudding user response:

I didn't have llvm tools enable using:

scl enable llvm-toolset-7 bash
scl enable devtoolset-7 bash

The above resolved this issue but another issue arises:

AttributeError: /lib64/libbcc.so.0: undefined symbol: bpf_module_create_b

CodePudding user response:

try to install clang : sudo yum install clang

and retry running the app.

  • Related