21

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!

  • Which version of Ubuntu and winetricks are you using? A first step would be a newer version of winetricks... – andrew.46 Mar 24 '16 at 5:46
  • 1
    version of Ubuntu is 14.04 and wine version is 1.6.2 – MAHESH Mar 26 '16 at 8:13
29

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:

| improve this answer | |
  • Worked for me : using the second snippet approch (with wget) – loloof64 Aug 26 '16 at 6:12
  • 2
    With recent versions of winetricks you need: sudo mv -v winetricks /usr/bin not sudo mv -v winetricks /usr/local/bin ` – Rilcon42 Jan 19 '17 at 22:49
  • Not sure why, but didn't work for me on Ubuntu 18.04 – EternusVia Jan 18 '19 at 18:43
  • Second solution truly worked for me on Ubuntu 18.04 while I tried installing .NET 4.6.2. Thank You! – kcpr Apr 7 '19 at 0:46
  • 1
    @kcpr Great news :) – andrew.46 Apr 7 '19 at 1:10
5

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)
| improve this answer | |
2

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.