I just had to troubleshoot an error code 256 during install of Setllers II, so I thought I’d share how I found the solution – after a considerable number of wrong guesses.
I finally found the real problem by launching Lutris from a terminal with:
lutris -d
Users of the Flatpak release would launch it like this:
flatpak run net.lutris.Lutris -d
This shows the install log in the terminal which doesn’t disappear when the install finishes.
Among the output I saw this:
DEBUG 2024-03-10 01:52:13,716 [interpreter._iter_commands:317]:Installer command: {'execute': {'args': "-c 'mv $GAMEDIR/drive_c/game/* $GAMEDIR'", 'file': '/bin/sh', 'terminal': False}}
lutris-wrapper: /bin/sh
Started initial process 223988 from /bin/sh -c mv /home/thub/Games/gog/the-settlers-ii-gold-edition/drive_c/game/* /home/thub/Games/gog/the-settlers-ii-gold-edition
Start monitoring process.
mv: /home/thub/.local/share/lutris/runtime/steam/amd64/lib/x86_64-linux-gnu/libattr.so.1: version `ATTR_1.3' not found (required by mv)
Monitored process exited.
Initial process has exited (return code: 256)
All processes have quit
Exit with return code 256
DEBUG 2024-03-10 01:52:13,960 [command.on_stop:219]:Process 223986 has terminated with code 256
DEBUG 2024-03-10 01:52:14,720 [commands._monitor_task:441]:Return code: 256
ERROR 2024-03-10 01:52:14,720 [errors.__init__:18]:Command exited with code 256
ERROR 2024-03-10 01:52:14,720 [exception_backstops.error_wrapper:81]:Error handling timeout function: Command exited with code 256
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/lutris/exception_backstops.py", line 79, in error_wrapper
return handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/lutris/installer/commands.py", line 443, in _monitor_task
raise ScriptingError(_("Command exited with code %s") % command.return_code)
lutris.installer.errors.ScriptingError: Command exited with code 256
I could see that the wine-based installer exited with a normal exit code of 0, but a subsequent command to clean up the files involved a shell mv
command, which spit out a version conflict error with a file in a steam runtime folder located among the Lutris runtimes. I browsed to the folder /home/thub/.local/share/lutris/runtime/steam
, renamed it, and relaunched lutris -d
so that I could see the log output and I tried the install again. This time it worked perfectly! Now I know I can safely delete that renamed folder.
It seems that as of early 2021 (based on the date on that folder), whatever version of Lutris I had installed downloaded a version of the Steam runtime and since then Lutris has changed how it handles this, at least for local Lutris installs (it may behave differently when running inside a Flatpak). This runtime had some pretty old libraries which caused a problem because the executable was running from my own system (/bin/sh
) which should be pretty up-to-date.
As a point of information, error code 256 has a general meaning on Linux. This error can happen any time the system fails to execute an executable binary. That means that library conflicts are a likely culprit, so being able to see the log for the install is important to troubleshoot such an error. In my case, the program couldn’t find all the libraries it needed to execute its one-line script with the mv
command.
Of course, error code 256 could be arbitrarily coming from the Windows binary for any number of reasons, so keep your wits about you.
I hope this helps someone.