Error when loading shared libraries: libbpf.so.1 on 1.4

Hello Everyone,

I am trying to build 1.4 rolling. It builds successfully. However, when I boot using the iso, it gives the following error messages:

error when loading shared libraries: libbpf.so.1: cannot open shared object file: No such file or directory

Thanks and Reagrds,
-=Srijan Nandi

libbpf.so.1 is installed by the libbpf1 package. You can use apt show libbpf1 to see if it’s installed. That package is a required part when building the ISO. If it’s missing, something probably went wrong during the ISO build (sometimes things like that don’t stop the build, which is why its very important to at least run smoketests against the newly built iso). My suggestion is just to build it again.

Hi,

can you show us some more details/screenshots? As stated by Netboy3 that package should have been installed by default

As you rightly mentioned, libbpf is already installed and I can see libbpf in the chroot directory:

/vyos/vyos-build/build/chroot/var/lib/dpkg/info/libbpf-dev:amd64.list
/vyos/vyos-build/build/chroot/var/lib/dpkg/info/libbpf1:amd64.triggers
/vyos/vyos-build/build/chroot/var/lib/dpkg/info/libbpf1:amd64.symbols
/vyos/vyos-build/build/chroot/var/lib/dpkg/info/libbpf1:amd64.list
/vyos/vyos-build/build/chroot/var/lib/dpkg/info/libbpf-dev:amd64.md5sums
/vyos/vyos-build/build/chroot/var/lib/dpkg/info/libbpf1:amd64.shlibs
/vyos/vyos-build/build/chroot/var/lib/dpkg/info/libbpf1:amd64.md5sums
/vyos/vyos-build/build/chroot/usr/lib/libbpf.so.1
/vyos/vyos-build/build/chroot/usr/lib/x86_64-linux-gnu/pkgconfig/libbpf.pc
/vyos/vyos-build/build/chroot/usr/lib/x86_64-linux-gnu/libbpf.so.1.1.0
/vyos/vyos-build/build/chroot/usr/lib/x86_64-linux-gnu/libbpf.so
/vyos/vyos-build/build/chroot/usr/lib/x86_64-linux-gnu/libbpf.so.1
/vyos/vyos-build/build/chroot/usr/lib/x86_64-linux-gnu/libbpf.a
/vyos/vyos-build/build/chroot/usr/include/bpf/libbpf_legacy.h
/vyos/vyos-build/build/chroot/usr/include/bpf/libbpf_common.h
/vyos/vyos-build/build/chroot/usr/include/bpf/libbpf_version.h
/vyos/vyos-build/build/chroot/usr/include/bpf/libbpf.h
/vyos/vyos-build/build/chroot/usr/share/doc/libbpf-dev
/vyos/vyos-build/build/chroot/usr/share/doc/libbpf1

The error comes from dropbear, as you can see from the screenshot attached. Somehow dropbear is not able to find libbpf.so.1 and am not sure where it is trying to search for it.

vyos/vyos/vyos-build/build/chroot/etc/ld.so.conf.d# cat x86_64-linux-gnu.conf

Multiarch support

/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

Even ldconfig is correctly set.

Screenshot of the error:

It’s not dropbear. dropbear doesn’t even have a dependency on libbpf. Whatever breaks in your system above (according to the screenshot) is the ip command when the startup sequence tries to up/down interfaces. ip is part of the iproute2 package which does depend on libbpf. I’m building the latest sources and did not encounter such a problem (iproute2 is a very important package in VyOS and would cause a badly broken distro if it can’t even load). Again, I suggest that you try to rebuild your ISO.

Thank you, Netboy3…a complete rebuild from scratch resolved the issue…

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.