Install wine on linux debian

Debian WineHQ Repository

To make installing the latest version of Wine as easy as possible, WineHQ has its own Debian repository. Should a newer version of Wine give problems, it is also possible to install an older version of your choice.

The WineHQ repository only offers packages for AMD64 and i386. I you need the ARM version, you can use the Debian packages.

Preparation

If your system is 64 bit, enable 32 bit architecture (if you haven’t already):

sudo dpkg --add-architecture i386

Add the repository

Download and add the repository key:

Select your Debian version and download the WineHQ sources file:

Update the package information:

Install Wine

Install one of the following packages:

sudo apt install --install-recommends winehq-stable
sudo apt install --install-recommends winehq-devel
sudo apt install --install-recommends winehq-staging

The WineHQ Wiki explains the differences between the branches.

Help

Sometimes there are problems installing Wine. If your problem is not listed, search the forum or if you can’t find an answer ask your question.

Missing dependencies

Read the FAQ about dependency errors and tips for troubleshooting dependency issues. The most common issues are:

Wrong repository

If you are not sure which version you are using, use cat /etc/os-release to find your Debian version and codename.

Third-party repositories

WineHQ packages are created and tested for a clean Debian installation. Using PPAs or third-party repositories may prevent the installation of Wine. Often the problem is that these repositories are not multiarch. The required 32 and 64-bit packages are missing or cannot be installed side by side. The deb.sury.org repository is known for causing problems.

Downgrade the problematic dependency packages to the official Debian version.

KDE Neon

Ubuntu 22.04 KDE Neon users report problems with the libpoppler-glib8 dependency. The solution is to downgrade this package to the official Ubuntu version. sudo apt install libpoppler-glib8:=22.02.0-2ubuntu0.1

Backports

Another cause may be the use of backports. A newer 64-bit version of a library is already installed, but the 32-bit version isn’t. These packages are given a lower priority so they will not be installed automatically. The solution is to manually install the missing 32-bit package from backports.

FAudio

Older versions of Wine (prior to version 6.21) have FAudio as a dependency. These packages are missing on Ubuntu 18.04. These can be downloaded from the Open Build Service. For Debian 10, these packages are available in backports.

Winehq key problems

Currently, the Wine servers are being synchronized. This means that some users still getting the older .sources file. If you get this warning, edit the winehq-.sources file and replace /usr/share/keyrings/ to /etc/apt/keyrings/.

Читайте также:  Установка альт линукс рабочая станция

For example: sudo sed -i s@/usr/share/keyrings/@/etc/apt/keyrings/@ /etc/apt/sources.list.d/winehq-focal.sources

If you downloaded and added the key before that time, you will need to download and add the new key and run sudo apt update to accept the repository changes.

Previously, apt-key was used to add the Wine key. If you get this warning, remove the Wine key with: sudo apt-key del «D43F 6401 4536 9C51 D786 DDEA 76F1 A20F F987 672F» And remove the the line about the WineHQ repository from /etc/apt/sources.list(.d/*).

Mirror sync in progress?

If you get an error message when trying to install a package from WineHQ that includes the line Mirror sync in progress? that is most likely the problem. There are many packages to sync, and it can take a long time to complete.

Wait a few hours, and try again. If the problem persists for more than a day, file a bug.

My Debian version is not listed

When a version of Debian is no longer supported, no new Wine packages are made. Check the WineHQ server to see if there are older packages are available. Because no new versions are made, adding the WineHQ repository is not necessary. Downloading and installing the four WineHQ deb packages is sufficient.

Please note that these packages are no longer maintained and are no longer supported.

Notes

  • Menu items are not created for Wine’s builtin programs (winecfg, etc.). If you upgrade the Wine distro packages that had added them, they will be removed. You can recreate them yourself using your menu editor.
  • The Wine files are installed in /opt/wine-/
  • WineHQ does not offer wine-gecko or wine-mono packages. When creating a new wineprefix, you will be asked if you want to download those components. For best compatibility, it is recommended to click Yes here. If the download doesn’t work for you, please follow the instructions on the Gecko and Mono wiki pages to install them manually.
  • Beginning with Wine 5.7, the WineHQ packages have an optional debconf setting to enable CAP_NET_RAW to allow applications that need to send and receive raw IP packets to do so. This is disabled by default because it carries a potential security risk, and the vast majority of applications do not need that capability. Users of applications that do need it can enable CAP_NET_RAW after installing Wine by running dpkg-reconfigure wine—amd64 wine- wine—i386 and answering yes to the three questions.
  • Binfmt_misc registration is not added. Consult your distro’s documentation for update-binfmts ( man update-binfmts ) if you wish to do this manually.
  • A complete Wine installation on a 64-bit system consists of four packages.
  • There are several versions of Wine on the repository. The latest version is installed by default. Usually, the latest version is recommended. However, it may happen that an older version is desired. Use apt policy winehq- to list the different available versions.
Читайте также:  Canon laserbase mf3228 драйвер linux

Installing without Internet

To install Wine on a Debian machine without internet access, you must have access to a second Debian machine (or VM) with an internet connection to download the WineHQ .deb package and its dependencies.

On the machine with internet, add the WineHQ repository and run apt update as described above.

Next, cache just the packages necessary for installing Wine, without extracting them:

sudo apt-get —download-only install winehq-

sudo apt-get —download-only dist-upgrade

Copy all of the .deb files in /var/cache/apt/archives to a USB stick:

cp -R /var/cache/apt/archives/ /media/usb-drive/deb-pkgs/

Finally, on the machine without internet, install all of the packages from the flash drive:

cd /media/usb-drive/deb-pkgs sudo dpkg -i *.deb

Building from Source

  • Beginning with 4.0-rc2, the WineHQ repository includes the .dsc, .diff.gz, and .orig.tar.gz files generated by the Open Build Service(OBS). These source packages can be found on «https://dl.winehq.org/wine-builds/debian/dists//main/source»
  • The latest version of Debian is multiarch. It is possible to install all 64 and 32 bit dependencies side by side. This allows Wine to be built using the steps listed under Shared WoW64.
  • On older versions of Debian the multiarch implementation could be incomplete. You can’t simply install 32-bit and 64-bit libraries alongside each other. If you’re on a 64-bit system, you’ll have to create an isolated environment for installing and building with 32-bit dependencies. See Building Wine for instructions on how to build in a chroot or container.

See Also

Источник

How To Install Wine to Run Windows Applications On Debian

When it comes to installing Windows applications on Linux, there’s no application that does it better than Wine. Wine is a compatibility layer that enables users to run Windows applications on POSIX compliant operating systems such as Linux and UNIX derivatives such as BSD, FreeBSD, and macOS.

Not all Windows applications are supported, and to get a comprehensive list of all supported applications, head over to the Wine application database – AppDB.

At the time of publishing this guide, the latest version of Wine is Wine 7.2, which is a development release. The latest stable release is Wine 7.0 Without further ado, let’s switch gears and install Wine on Debian desktops.

Installing Wine in Debian Linux

Straight off the bat, log into your system and update the package index as a sudo user.

A few dependencies are required for the installation of Wine to go through smoothly.

$ sudo apt install software-properties-common gnupg2

With your system up to date and prerequisites installed, proceed to the next step.

Next, you need to enable 32-bit architecture on the Debian system to seamlessly run 32-bit applications with Wine.

$ sudo dpkg --add-architecture i386

There are two approaches to installing Wine. You can install Wine from the Debian repository using the APT package manager, which is simple and straightforward and all you need is to run the command:

However, this will give you an older version of Wine than the one in the WineHQ repository. Therefore, to install the latest Wine version, it’s recommended to install it from the WineHQ repository.

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key $ sudo apt-key add winehq.key

Once you have successfully added the GPG keys, proceed and add the WineHQ repository to your system.

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main'

Then update the package lists to notify Debian about the newly added Wine repository and start using it.

Читайте также:  Kali linux mac os wifi

To install the latest stable version of Wine, run the command

$ sudo apt install --install-recommends winehq-stable

This will give you Wine 7.0.

Alternatively, you can install the development branch which provides the most recent version – Wine 7.2.

$ sudo apt install --install-recommends winehq-devel

The installation is quite heavy as it involves the installation of hundreds of packages and dependencies. In my case, this came to about 1.7GB and took roughly 15min. At this point, you can take a much-needed break as the installation of Wine goes on.

Install Wine in Debian

Once installed, verify the Wine version as follows.

$ wine --version wine-7.2 

Configuring Wine on Debian Linux

So far, we have successfully installed Wine on Debian. However, some post-installation steps are required before Wine is ready to install Windows Apps.

To configure Wine, run the command:

This creates a hidden directory in the home directory called .wine that contains a “virtual” drive C that contains directories that you would find on a Windows system such as Program Files, Program Files, Program Files (x86), users, and Windows.

Configure Wine in Debian

On the next pop-up, click ‘Install‘ to install the wine-mono package which is a prerequisite for .NET applications.

Wine Mono Installation

The installation will get underway. This takes a minute or two.

Finally, you will see the Wine configuration window as shown. You should be good to go with the default settings, but feel free to adjust the settings to your own preference.

Wine Configuration Settings

Installing Windows Application with Wine in Debian

Now, let us see how you can install a Windows App using Wine. To demonstrate this, we will install a VLC media player which is a free and open-source cross-platform media player.

So, head over to the official VLC download page and download the executable file. Once downloaded, right-click on select ‘Open with other application’.

Open With Other Application

On the pop-up that appears, select ‘Wine Windows Program Loader‘.

Wine Windows Program Loader

Once again, right-click on the installer and select ‘Open with Wine Windows Program Loader‘. The VLC media installation wizard will open. Click ‘Ok’ to start the installation and follow along right till the end.

Install Windows Apps with Wine in Debian

Inside the .wine folder, navigate to the ‘Virtual’ drive_c folder and then the ‘Program Files’ folder. Here you will see a directory for the just installed VLC multimedia application.

Confirm Windows Apps in Debian

This wraps up this guide. In this tutorial, we have demonstrated how to install Wine on Debian Linux. We went a step further and showed you how you can run and install a Windows application with Wine in Debian.

Источник

Оцените статью
Adblock
detector