I’d attempt digging up an old version of nix from hydra. Looks like the 22.11 or 22.5 nixpkgses may have had a nix built with glibc 2.36. Nix can then run and update itself (with a glibc 2.38 to go along that won’t interfere with the rest of your system).
Alternatively, grab the source code and build from scratch.
Edit: oh, hrm, this is bash being complained about. I haven’t used nix-shell in a while, why is it using your host’s glibc to run a bash linked against a newer glibc? Is it actually running bash from the nix store, but maybe the nix you’re using is under an older glibc causing that to propagate because you haven’t explicitly updated it?
Thanks for the responses!
There is no output from nix-env -q
My LD_LIBRARY_PATH was set to /usr/lib/x86_64-linux-gnu, and I’m not sure why. I unset it, and can do things like:
❯ nix-env -q
~
❯ nix-shell -p cowsay lolcat
[nix-shell:~]$ cowsay Nix is working
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
________________
< Nix is working >
----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
[nix-shell:~]$ echo Nix is working | lolcat
Nix is working
So I’m not sure how to proceed now. That LD_LIBRARY_PATH is set is my .zshrc, but there’s no commentary about why it is there. There’s a crapload of symlinks and folders in /usr/lib/x86_64-linux-gnu.
Frankly, setting LD_LIBRARY_PATHat all is a massive red flag. I’d remove it and see if anything breaks, likely nothing will, and some things may suddenly unbreak.