NixOS / nix.dev

Official documentation for getting things done with Nix.
https://nix.dev
Creative Commons Attribution Share Alike 4.0 International
2.47k stars 249 forks source link

Common errors #170

Open domenkozar opened 3 years ago

domenkozar commented 3 years ago

Unexpected usage error /nix/store/ikl21vjfq900ccbqg1xasp83kadw6q8y-glibc-2.32-46/lib/libc.so.6: undefined symbol: _dl_fatal_printf, version GLIBC_PRIVATE

This happens when enviromnet glibc is older than the system glibc.

In my case it was outdated haskell-language server pointing to /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6

willbush commented 2 months ago

I too have run into a similar error. I wonder how this topic would manifest though at nix.dev. It seems dependent on what one uses nix for. However, an obvious one, If you're using flakes, is forgetting to stage things.

fricklerhandwerk commented 2 months ago

This typically occurs if you build an environment (buildEnv, NixOS, Home Manager, ...) where packages from sufficiently different versions of Nixpkgs are mixed. There are a few workarounds, such as adding the older glibc to the newer Nixpkgs as an overlay (or vice versa, depending on the amount of recompilation), or merely moving the versions closer together.

This would definitely be worth a troubleshooting tip.