Numerous Steam games failing with missing libcrypt.so.1

I’m running unstable NixOS, using program.steam.enable to run Steam. I have all of the Steam Play stuff disabled for now, so I think I’m only playing Linux-native games.

I can run Factorio and Stellaris fine, so I know at least some Steam games work.

But when I try to run Alien Isolation, the game never starts. In the console I can see following error:

AlienIsolation: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

Any ideas?

Update: XCOM2 fails with the same error message!
Update2: Ugh, Company of Heroes 2 fails with same message.

1 Like

Same problem here, since I upgraded to 22.11 :frowning:

1 Like

Root cause is probably the libxcrypt switch. The steam FHS env probably needs libxcrypt.

Edit: This is now fixed in nixos-22.11 and nixos-unstable.

Something like (untested)

Obsolete, do not use anymore
programs.steam.package = pkgs.steam.override {
  extraLibraries = pkgs: (with config.hardware.opengl;
    if pkgs.hostPlatform.is64bit
    then [ package ] ++ extraPackages
    else [ package32 ] ++ extraPackages32)
    ++ [ pkgs.libxcrypt ];
};
3 Likes

THAT WORKED :smiley: :+1:

1 Like

@raphi should this also fix steam-run associated issues?

I was running running ChimeraX using steam-run (see thread) but after the last upgrade it also failed with the error:

/home/moritz/Downloads/chimerax-1.4/bin/ChimeraX: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

I added your suggested steam package overwriting statement, but without success unfortunately…

steam-run should work if you’re using the one installed system-wide (=/run/current-system/sw/bin/steam-run).

nix-shell -p steam-run etc. will not work because it won’t use that override.

fwiw for someone wanting to get a PR in: the fix is adding libxcrypt here. I can’t easily submit this fix in the near future though.

As of now this is fixed in both nixos-22.11 and nixos-unstable. The programs.steam.pacakge workaround above is not required anymore on an updated system.

1 Like