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"
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo cp winetricks /usr/local/bin

Or

cd "${HOME}/Downloads"
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks.bash-completion
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

Hello.

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: