How to fix "Exit with return code 256"

I had the problem that i could not install ANYTHING in Lutris, because it always sended me message 256 in the log. There was no answer on the internet. I found my problem.

Some distros like mine (Manjaro), install dev versions of wine and wine tricks on the distro, you have to install classic ones.

How i solved my problem:

  • Uninstall anything related with wine, winetricks and lutris.
  • Remove all folders made by lutris (typically in ~/games and ~/wine games) Also try:
sudo rm -rf /var/lib/lutris   
sudo rm -rf /var/lutris
sudo rm -rf /lutris
rm -rf ~/.config/lutris
  • Do the same erase folders process with wine. Just replace lutris with wine on the commands
  • Install wine in your package manager. In my case is:
sudo pacman -S wine
  • Check your version is the latest one for regular use (NOT DEVELOPMENT). In 2023 is 8.1
wine --version
  • Install winetricks. In my case (Manjaro pacman aur), the only avaliable version is the development one. So i installed manualy winetricks with:
cd "${HOME}/Downloads"
chmod +x winetricks
sudo cp winetricks /usr/local/bin


cd "${HOME}/Downloads"
sudo cp winetricks.bash-completion /usr/share/bash-completion/completions/winetricks
  • After that, re-install lutris. In my case is
sudo pacman -S lutris
  • Install your favorite game from lutris website
  • The game should be installing and message #256 should’nt be appearing anymore

Winetricks website:

Winetricks - WineHQ Wiki

1 Like


Very interesting.
Thank for all.

I see (and try) another method without terminal :

Its works for me.

Easy, just destroy a file.


The problem is, that’s not a useful error code. There are many wrongs that will cause Lutris to spit out that error.

They might as well just use “exit 1” so people aren’t chasing their tails thinking that 256 code is a useful diagnostic.

Anything other than “0” is an unsuccessful termination. Programs and scripts can return different error codes for different reasons of failure, but this does not seem to be the case here, or this code may be returned for too many unknown failures to be useful.

It could also be something silly like, the error code being multiplied by 256 and it’s really exit code 1 :slight_smile:

1 Like

Sorry for replying so long after the initial post, but are you able to provide more detail on how to do this on a Ubuntu/Debian distro? (If you are wondering I’m using Linux Mint 21.2 Version 5.8.4 with the 5.15.0-84-generic Linux Kernel)

are you asking how to follow this tutorial? if so I can help you. my discord is “dagoated77”

I had the same problem and this tutorial helped me.

I faced this error code because on a certain installation step, a download of a tar file was failing and the installer was going ahead anyway and trying to extract the file, which was not present – after manually downloading that file (whose url was mentioned in the logs), and placing it in the required directory (also mentioned in the logs), the installation was successful. Just cancelled the installation without removing game files and started it again.

So, as @Grogan mentioned, it could be anything…