winetricks sha1sum mismatch rename and try again

I just started using Ubuntu, and I'm trying to get Wine up and running. By using Winetricks I'm trying to install some software and I keep getting this error message: it says

sha1sum mismatch! Rename /home/.cache/winetricks/win2ksp4/W2KSP4_EN.EXE and try again.

I don't know what it wants me to rename. I'm confused by this error screen. Does anyone have a fix for this?

Thanks!


The most conservative approach to this issue is to do exactly as the error command suggests and rename the file with this single command:

mv -v /home/.cache/winetricks/win2ksp4/W2KSP4_EN.EXE \
      /home/.cache/winetricks/win2ksp4/W2KSP4_EN.EXE_bak

And this might be enough. However if the issue recurs you can try an updated copy of winetricks:

sudo apt-get remove winetricks
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks 
sudo mv -v winetricks /usr/local/bin

And then you will have access to the newest version of winetricks which should not contain the 'shasum mismatch' error. The latest version that I have tested (after downloading and installing in this manner) is shown as follows:

andrew@ilium~$ winetricks --version
20191224-next - sha256sum: d8ac5e46ad4351faf3a3c6879044d059488001f3dd9364a5651c9e041cb97326
andrew@ilium~$ 

If this does not work out for you for whatever reason, and you wish to return to the Repository version of winetricks use the following commands in a Terminal screen:

sudo rm /usr/local/bin/winetricks
sudo apt-get install winetricks

And your system will then have returned to default: the Repository version of winetricks...

References:

  • WineHQ Wiki: Winetricks

To install the latest service pack with winehttp, try upgrading your winetricks or try under the latest development version, e.g.

curl -o winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
sh winetricks winhttp

or one of the following one-liners:

curl -s https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks | sh -s winhttp

or:

sh -s winhttp < <(wget -qO- https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks)

One alternative is to modify /usr/bin/winetricks, which is a shell script, to include the updated sha256sum. You should do this only if you are sure that the file in your cache has been properly downloaded.

In my case, the error is:

sha256sum mismatch! Rename /home/coderazzi/.cache/winetricks/PowerPointViewer/PowerPointViewer.exe and try again.

I can check the sha256 sum of this file:

sha256sum /home/coderazzi/.cache/winetricks/PowerPointViewer/PowerPointViewer.exe

And the result is: e17cb384eeac4caf08a4f5d4bceb9697fff83fa942d2a3d9ad0294a9b1774390

Doing now:

grep PowerPointViewer.exe /usr/bin/winetricks

Shows a few lines with content:

...     /PowerPointViewer.exe" 249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423

It can be updated now by replacing the original sum with the new one, just by doing:

sudo sed -i -e s/249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423/e17cb384eeac4caf08a4f5d4bceb9697fff83fa942d2a3d9ad0294a9b1774390/g /usr/bin/winetricks

Executing now winetricks would avoid the original error.