0

I followed the instruction to build and install the babeltrace2 python3 bindings.

Then I got the babeltrace2 binary at: /usr/local/bin/babeltrace2

But when I tried to run it, it reports below error:

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

I used apt-file search libbabeltrace2 to find the package that contains this lib. Unfortunately there's no result.

Then I tried apt-file search libbabeltrace. It returns a lot of results but they are all for libbabeltrace1.

So how can I install and run the babeltrace2 on Ubuntu 20.04?

6
  • 1
    Linux distributions typically provide the Babeltrace 2 Python bindings as the python3-bt2 package. Commented Sep 4, 2022 at 8:50
  • @ChanganAuto Thanks but I did try apt search python3-bt2 and there's no result. Commented Sep 4, 2022 at 9:13
  • 1
    python3-bt2is available in 22.04 repositories, don't know (and can't test) about 20.04. Commented Sep 4, 2022 at 9:25
  • Thanks, let me try to add the 22.04 repo. Not sure if it's safe... Commented Sep 4, 2022 at 9:32
  • 1
    Generally, when building from source I'd expect e.g. (here) libbabeltrace2.so.0 to appear in the build tree and be installed by make install - might it be that part of the build or install failed for you? NOTED: Yet another package that has no INTRODUCTION - if you do not know what this package is meant to do, then you will remain out in the dark.
    – Hannu
    Commented Sep 5, 2022 at 11:46

1 Answer 1

2

A package search for babeltrace shows that babeltrace is available, but that babeltrace2 is only available from version 21.10 and onward.

It is unsafe to update packages outside of their context. You should rather upgrade Ubuntu itself, or compile the package from source.

You must log in to answer this question.

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