Steam game can't find libz.so.1

Hi all, fairly new NixOS user here. I’m trying to get Divinity Original Sin working on NixOS but I’m getting the following error:

./EoCApp: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

I’ve tried installing zlib as an override as per Steam - NixOS Wiki. I’m sure I’m missing something obvious.

Just for additional information, I’m using an AMD graphics card so to get Divinity working on previous Linux distros I’ve had to follow this guide: Divinity: Original Sin may soon work with Mesa drivers | GamingOnLinux

Thanks for any help you all can provide.

I played some of this game on NixOS using steam and an nvidia card. I probably had the same error. I’m trying to recall the fix… it was really simple, like adding the current directory to LD_PRELOAD in the launcher script or something. I’m sorry I can’t remember more details at the moment. I’ll give it some more thought.

To fix it, edit {path_to_steam_games}/steamapps/common/Divinity Original Sin Enhanced Edition/runner.sh from

#!/bin/sh

LD_LIBRARY_PATH="." ./EoCApp

to

#!/bin/sh

LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./EoCApp

This should allow the game to properly use libraries provided in the steam-runtime derivation.

4 Likes