Software & AppsOperating SystemLinux

How To Fix “sha1sum mismatch” Error When Using Winetricks in Ubuntu

Ubuntu 14

In the world of Ubuntu, one of the common errors that users may encounter is the “sha1sum mismatch” error when using Winetricks. This error typically occurs when the sha1sum of a downloaded file does not match the expected value. This article will guide you through several methods to fix this issue.

Quick Answer

To fix the "sha1sum mismatch" error when using Winetricks in Ubuntu, you can try renaming the problematic file, updating Winetricks, using the built-in self-update function, or manually updating the sha256 sum in the Winetricks script.

What is sha1sum?

Before we dive into the solutions, let’s understand what sha1sum is. The ‘sha1sum’ is a cryptographic hash function that takes an input and produces a 160-bit (20-byte) hash value. This hash value is typically rendered as a hexadecimal number, 40 digits long. It’s primarily used to verify the integrity of files.

Understanding the Error

The “sha1sum mismatch” error usually means that the file you’ve downloaded is not the same as the file Winetricks expected to download. This could be due to several reasons such as the file being updated on the server but not in the Winetricks script, or the download being corrupted.

Solution 1: Rename the File

One of the simplest solutions is to rename the problematic file. Here’s how you can do it:

  1. Open a terminal. You can do this by pressing Ctrl+Alt+T.
  2. Run the following command:
mv -v /home/.cache/winetricks/win2ksp4/W2KSP4_EN.EXE /home/.cache/winetricks/win2ksp4/W2KSP4_EN.EXE_bak

This command renames the problematic file, forcing Winetricks to download it again. The -v option makes the ‘mv’ command verbose, meaning it will show what it’s doing.

Solution 2: Update Winetricks

If the first solution doesn’t work, updating Winetricks might solve the issue. Here’s how:

  1. Open a terminal.
  2. Remove the current version of Winetricks by running:
sudo apt-get remove winetricks

This command removes the current version of Winetricks installed on your system.

  1. Download the latest version of Winetricks by running:

The ‘wget’ command is a free utility for non-interactive download of files from the web.

  1. Make the downloaded file executable by running:
chmod +x winetricks

The ‘chmod’ command changes the permissions of the file. The ‘+x’ makes the file executable.

  1. Move the downloaded file to the appropriate location by running:
sudo mv -v winetricks /usr/local/bin

This command moves the updated Winetricks file to the ‘/usr/local/bin’ directory where executable files are usually stored.

Solution 3: Self-update Winetricks

Winetricks also has a built-in self-update function. You can use it by running:

sudo winetricks --self-update

This command updates Winetricks to the latest version.

Solution 4: Manually Update the sha256 Sum

If none of the above solutions work, you can manually update the sha256 sum in the Winetricks script.

  1. Open a terminal.
  2. Check the sha256 sum of the problematic file by running:
sha256sum /home/coderazzi/.cache/winetricks/PowerPointViewer/PowerPointViewer.exe
  1. Find the line in the shell script that contains the sha256 sum:
grep PowerPointViewer.exe /usr/bin/winetricks
  1. Replace the old sha256 sum with the new one:
sudo sed -i -e s/old_sha256_sum/new_sha256_sum/g /usr/bin/winetricks

Make sure to replace “old_sha256_sum” and “new_sha256_sum” with the actual values obtained from steps 2 and 4.


The “sha1sum mismatch” error in Winetricks can be frustrating, but it’s usually easy to fix. The solutions outlined in this article should help you resolve the issue and continue using Winetricks without any problems. If you’re still encountering issues, consider seeking help from the Ubuntu community.

Remember, it’s always good practice to keep your system and applications updated to avoid such issues. Happy troubleshooting!

What is Winetricks?

Winetricks is a script that allows users to easily install and configure various Windows applications and libraries on Linux systems using Wine, a compatibility layer that allows running Windows applications on Linux.

How can I open a terminal in Ubuntu?

To open a terminal in Ubuntu, you can press Ctrl+Alt+T on your keyboard. This will launch the default terminal emulator.

What does the `-v` option in the `mv` command do?

The -v option in the mv command stands for "verbose." When used, it makes the command display the actions it is performing, providing more detailed information.

How can I remove a package in Ubuntu?

To remove a package in Ubuntu, you can use the apt-get remove command followed by the package name. For example, to remove Winetricks, you can run sudo apt-get remove winetricks.

What does the `wget` command do?

The wget command is a utility for non-interactive downloading of files from the web. It allows you to download files from URLs directly to your system.

How can I make a file executable in Ubuntu?

To make a file executable in Ubuntu, you can use the chmod command with the +x option. For example, chmod +x filename will make the file named "filename" executable.

What is the purpose of the `–self-update` option in the `winetricks` command?

The --self-update option in the winetricks command is used to update the Winetricks script itself to the latest version. It ensures that you have the most up-to-date version of Winetricks installed on your system.

How can I update a file’s sha256 sum in the Winetricks script?

To update a file’s sha256 sum in the Winetricks script, you can use the sed command. By specifying the old and new sha256 sums, you can replace the old sum with the new one in the script. For example, sudo sed -i -e s/old_sha256_sum/new_sha256_sum/g /usr/bin/winetricks will update the sha256 sum in the Winetricks script.

Leave a Comment

Your email address will not be published. Required fields are marked *