How to deal with `/lib64/` missing on NixOS?

I’m trying to run julia on NixOS, and I just came across an issue where calling Plots.mp4(anim, "foobar.mp4") errors out because the julia Plots.jl package brings in its own ffmpeg binary to ~/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/bin/ffmpeg and it doesn’t seem to be compatible with NixOS. Running this binary I get,

$ ./ffmpeg
bash: ./ffmpeg: No such file or directory

Ok, so what does file have to say?

$ file ffmpeg
ffmpeg: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/, for GNU/Linux 2.4.0, stripped

So as best as I can tell the issue is that /lib64/ doesn’t exist on NixOS systems.

What’s the recommended workaround for these scenarios? I’m open to hacky-ish ideas…

EDIT: created an issue on the Plots.jl project here:

I built GitHub - Mic92/nix-ld: Run unpatched dynamic binaries on NixOS to cope with this. See the two examples on how to use it.


The alternative is fhsuserenv. You can find a few examples here:


Packaging/Binaries - NixOS Wiki gives you some general knowledge on the topic. As well as autopatchelf - what it can look like | Farid Zakaria’s Blog and GitHub - Lassulus/nix-autobahn


Thank you so much @Mic92! This is all super helpful.

Hosted by Flying Circus.