Trying to run bitcoin-qt (0.22), ldd shows missing dependencies

I’m trying to run the latest Bitcoin 0.22 version, specifically the bitcoin-qt gui app (downloaded binary version). However, it fails to start with “No such file or directory”, and ldd is showing the following missing dependencies:

However, I have in my configuration.nix the following, which I thought would supply these dependencies:

environment.systemPackages = with pkgs; [

Any pointers on what may be the problem?

$> pwd

$> ls    
Permissions Links Size User    Group Date Modified    Name
.rwxr-xr-x      1 2.2M bgibson users 2021-09-08 11:15 bitcoin-cli*
.rwxr-xr-x      1  36M bgibson users 2021-09-08 11:15 bitcoin-qt*
.rwxr-xr-x      1 2.8M bgibson users 2021-09-08 11:15 bitcoin-tx*
.rwxr-xr-x      1 2.0M bgibson users 2021-09-08 11:15 bitcoin-util*
.rwxr-xr-x      1 7.5M bgibson users 2021-09-08 11:15 bitcoin-wallet*
.rwxr-xr-x      1  13M bgibson users 2021-09-08 11:15 bitcoind*
.rwxr-xr-x      1  21M bgibson users 2021-09-08 11:15 test_bitcoin*

$> ./bitcoin-qt 
zsh: no such file or directory: ./bitcoin-qt

$> ldd bitcoin-qt (0x00007ffd587d2000) => /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/ (0x00007fdc20e8a000) => /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/ (0x00007fdc20e7f000) => not found => not found => not found => not found => not found => /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/ (0x00007fdc20e78000) => /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/ (0x00007fdc20d37000) => /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/ (0x00007fdc20d1d000) => /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/ (0x00007fdc20b56000)
	/lib64/ => /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib64/ (0x00007fdc230b1000)

What do you mean by “downloaded binary”? As in precompiled by them?

You need to use patchelf to do some interpreter as well as rpath patching.

Best is to wrap in a derivation and use autoPatchelfHook.


A Nix package is a function. So a given package has its dependencies provided as inputs to the function. Nix then sets things up so that binaries can find their dependencies at runtime.

In practice this means that if you “install” a library so that a program can find it, it won’t work because the program won’t know where to find the library; Libraries are not installed in NixOS like thry are in other distros.

You should be able to install bitcoin from Nix. We have 0.22.


Thanks, I ended up rebuilding with the version in nixpkgs. Nice to see Russel O’connor and Pavol Rusnak are the maintainers of it and it’s the most current version, should have guessed.