Skip to content

Fedora: bladeRF-cli cannot find libbladeRF.so.2 after source install #1029

@fahadwajed

Description

@fahadwajed

I ran into this recently and thought it would be helpful to mention it in the Building bladeRF libraries and tools from source section.

After installing bladeRF from source, running

bladeRF-cli --version

may produce the error:

bladeRF-cli: error while loading shared libraries: libbladeRF.so.2: cannot open shared object file: No such file or directory

This is not a problem with bladeRF itself, it happens because Fedora’s dynamic linker cannot find the libbladeRF.so.2 shared library.

The fix is to update the system’s library search path so it includes the directory where the bladeRF library was installed.
Temporary fix (shell-specific, per session)

Add the library path to your shell configuration file (~/.bashrc or ~/.zshrc):

export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH

Then reload your shell configuration or open a new terminal.
Permanent fix (system-wide)

Create a configuration file telling the dynamic linker where to look for the library:

echo "/usr/local/lib64" | sudo tee /etc/ld.so.conf.d/bladerf.conf

Update the linker cache:

sudo ldconfig

After applying either fix, verify:

bladeRF-cli --version

On Fedora and other 64-bit Linux distributions, libraries installed from source typically go into /usr/local/lib64 (instead of /usr/local/lib) because of the system’s multi-arch library layout. Always check where the library actually resides by running:

sudo find /usr/local -name "libbladeRF.so*"

Use that exact directory path when updating LD_LIBRARY_PATH or creating a file in /etc/ld.so.conf.d/. This avoids hard-coding incorrect paths and ensures compatibility if the build system installs to a non-default location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions