We can easily install wine 5 latest version on Ubuntu using the repository. you can also download and install it offline. Let’s see, how to install wine ubuntu.
Find the repository link and install them according to your OS version.
## Ubuntu 16.04 sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main' ## Ubuntu 19.10 sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main' ## Ubuntu 18.04 sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
How To Install Wine 5 Version On Ubuntu 18.04/19.10:
- If you don’t have wine installed on your machine, you need to install it using the command line. if it’s already installed, we can check the wine version using the below command.
2. If it’s already present on your machine, we have to remove the old version.
sudo apt remove winehq-stable wine-stable wine1.6 wine-mono wine-geco winetricks
3. We need to run the below command to make it compatible with 1386 architecture.
sudo dpkg --add-architecture i386
4. Download and run the below command to add the repository key to the system.
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
5. We will add the official repository to the system using the below commands for a different version of Linux distro.
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
If you face the below issue while running the above command.
How To Solve Wine Unmet Dependencies:
Solution 1: If you face the above errors, you may try to install with the below commands.
sudo apt install aptitude sudo aptitude install winehq-stable
Solution 2: you can try with the below command if Solution 1 doesn’t work for you.
sudo apt-add-repository --remove 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard ./' wget -nc https://dl.winehq.org/wine-builds/Release.key sudo apt-key add Release.key sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
Once you have executed the above commands, we need to update the system.
sudo apt update
You can install your preferable wine using any of the below commands.
sudo apt-get install --install-recommends winehq-stable sudo apt-get install --install-recommends winehq-devel sudo apt-get install --install-recommends winehq-staging
Solution 3: If both the solution doesn’t work for you, try this one. Remove all the wine repository from “software and updates” then run the following commands. if you want to run directly without removing, you can go ahead.
In my case, This solution worked for me.
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main' sudo apt update && sudo apt install --install-recommends winehq-stable
Finally, we have installed the wine 5 version on ubuntu 18.04 as you can see in the below image. We can also download wine 5 and install it manually on the ubuntu.