WineHQ

Ubuntu: Difference between revisions

(→‎Installing WineHQ packages: add instructions for 18.10)
(→‎Installing WineHQ packages: remove 19.10; it is EOL)
(22 intermediate revisions by the same user not shown)
Line 2: Line 2:
'''Translations of this page:'''  {{flag|China}} [[Ubuntu_zhcn|简体中文]]
'''Translations of this page:'''  {{flag|China}} [[Ubuntu_zhcn|简体中文]]
== Installing WineHQ packages ==
== Installing WineHQ packages ==
'''If you have previously installed a Wine package from another repository, please remove it and any packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) before attempting to install the WineHQ packages, as they may cause dependency conflicts.'''
{{warning}}'''The WineHQ repository key was changed on 2018-12-19.''' 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.
 
{{warning}}'''Ubuntu 18.04/Linux Mint 19.x do not provide FAudio, which is a dependency of current Wine. Follow the instructions in https://forum.winehq.org/viewtopic.php?f=8&t=32192 to install FAudio from the OBS.''' (FAudio packages for Ubuntu 19.10 and later are in the distro's universe repository.)
 
If you have previously installed a Wine package from another repository, please remove it and any packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) before attempting to install the WineHQ packages, as they may cause dependency conflicts.


If your system is 64 bit, enable 32 bit architecture (if you haven't already):
If your system is 64 bit, enable 32 bit architecture (if you haven't already):
Line 8: Line 12:
  sudo dpkg --add-architecture i386  
  sudo dpkg --add-architecture i386  


'''For Ubuntu 18.10:'''
Download and add the repository key:
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -


Add the repository:
Add the repository:
 
{| style="width: 100%" class="wikitable"
  wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
!For this version:
sudo apt-key add Release.key
!Use this command:
sudo apt-add-repository <span class="plainlinks">https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard</span> ./
|-
 
|Ubuntu 20.04
'''For Ubuntu versions prior to 18.10:'''
| sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
 
|-
Add the repository:
|Ubuntu 18.04
 
Linux Mint 19.x
wget -nc https://dl.winehq.org/wine-builds/Release.key
| sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt-key add Release.key
|-
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
|Ubuntu 16.04
 
Linux Mint 18.x
{{warning}} ''On Linux Mint 17.x, the last line should be the following:''
| sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ trusty main'
|}
{{warning}} ''On Linux Mint 18.x, the last line should be the following:''
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
{{warning}} ''On Linux Mint 19.x, the last line should be the following:''
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'


Update packages:
Update packages:


  sudo apt-get update
  sudo apt update


Then install '''one of the following packages''':
Then install '''one of the following packages''':
Line 40: Line 41:
! Stable branch
! Stable branch
|
|
  sudo apt-get install --install-recommends winehq-stable
  sudo apt install --install-recommends winehq-stable
|-
|-
! Development branch
! Development branch
|
|
  sudo apt-get install --install-recommends winehq-devel
  sudo apt install --install-recommends winehq-devel
|-
|-
! Staging branch
! Staging branch
|
|
  sudo apt-get install --install-recommends winehq-staging
  sudo apt install --install-recommends winehq-staging
|}
|}
If apt-get complains about missing dependencies, install them, then repeat the last two steps (update and install).  
If apt complains about missing dependencies, install them, then repeat the last two steps (update and install). See [[FAQ#How_do_I_solve_dependency_errors_when_trying_to_install_Wine.3F|the FAQ entry on dependency errors]] for tips on troubleshooting dependency issues.


----
----


'''If you have previously used the distro packages, you will notice some differences in the WineHQ ones:'''
====If you have previously used the distro packages, you will notice some differences in the WineHQ ones:====


* Files are installed to /opt/wine-devel or /opt/wine-staging.
* Files are installed to /opt/wine-devel, opt/wine-stable, or /opt/wine-staging (depending on which version you installed).


* Menu items are not created for Wine's builtin programs (winecfg, etc.), and if you are upgrading from a distro package that had added them, they will be removed. You can recreate them yourself using your menu editor.
* Menu items are not created for Wine's builtin programs (winecfg, etc.), and if you are upgrading from a distro package that had added them, they will be removed. You can recreate them yourself using your menu editor.
Line 63: Line 64:


* WineHQ does not at present package wine-gecko or wine-mono. When creating a new wine prefix, 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 [http://wiki.winehq.org/Gecko Gecko] and [http://wiki.winehq.org/Mono Mono] wiki pages to install them manually.
* WineHQ does not at present package wine-gecko or wine-mono. When creating a new wine prefix, 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 [http://wiki.winehq.org/Gecko Gecko] and [http://wiki.winehq.org/Mono Mono] wiki pages to install them manually.
* Beginning with Wine 5.7, the WineHQ Ubuntu 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-<branch>-amd64 wine-<branch> wine-<branch>-i386
and answering yes to the three questions. (Substitute devel, staging, or stable for <branch> in the above command.)
   
   
----
----
Line 69: Line 75:
To install Wine on an Ubuntu machine without internet access, you must have access to a second Ubuntu machine (or VM) with an internet connection to download the Wine .deb package and its dependencies.
To install Wine on an Ubuntu machine without internet access, you must have access to a second Ubuntu machine (or VM) with an internet connection to download the Wine .deb package and its dependencies.


The procedure goes like this:
On the machine with internet, add the WineHQ repository and run apt update as described above.
On the machine with internet, add the WineHQ PPA, then cache just the necessary packages without actually extracting them:
 
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update


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


  sudo apt-get clean
  sudo apt-get clean
Line 97: Line 99:
== See Also ==
== See Also ==
* [https://dl.winehq.org/wine-builds/ubuntu/pool/main/ Official WineHQ packages].  
* [https://dl.winehq.org/wine-builds/ubuntu/pool/main/ Official WineHQ packages].  
* [https://build.opensuse.org/project/show/Emulators:Wine:Debian WineHQ Debian/Ubuntu package build scripts and logs]
* [[Building Biarch Wine On Ubuntu]]
* [[Building Biarch Wine On Ubuntu]]
* [[Building Wine]]
* [[Building Wine]]

Revision as of 23:03, 8 July 2020

Translations of this page: 简体中文

Installing WineHQ packages

The WineHQ repository key was changed on 2018-12-19. 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.

Ubuntu 18.04/Linux Mint 19.x do not provide FAudio, which is a dependency of current Wine. Follow the instructions in https://forum.winehq.org/viewtopic.php?f=8&t=32192 to install FAudio from the OBS. (FAudio packages for Ubuntu 19.10 and later are in the distro's universe repository.)

If you have previously installed a Wine package from another repository, please remove it and any packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) before attempting to install the WineHQ packages, as they may cause dependency conflicts.

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

sudo dpkg --add-architecture i386 

Download and add the repository key:

wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

Add the repository:

For this version: Use this command:
Ubuntu 20.04 sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
Ubuntu 18.04

Linux Mint 19.x

sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
Ubuntu 16.04

Linux Mint 18.x

sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'

Update packages:

sudo apt update

Then install one of the following packages:

Stable branch
sudo apt install --install-recommends winehq-stable
Development branch
sudo apt install --install-recommends winehq-devel
Staging branch
sudo apt install --install-recommends winehq-staging

If apt complains about missing dependencies, install them, then repeat the last two steps (update and install). See the FAQ entry on dependency errors for tips on troubleshooting dependency issues.


If you have previously used the distro packages, you will notice some differences in the WineHQ ones:

  • Files are installed to /opt/wine-devel, opt/wine-stable, or /opt/wine-staging (depending on which version you installed).
  • Menu items are not created for Wine's builtin programs (winecfg, etc.), and if you are upgrading from a distro package that had added them, they will be removed. You can recreate them yourself using your menu editor.
  • Binfmt_misc registration is not added. Consult your distro's documentation for update-binfmts if you wish to do this manually.
  • WineHQ does not at present package wine-gecko or wine-mono. When creating a new wine prefix, 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 Ubuntu 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-<branch>-amd64 wine-<branch> wine-<branch>-i386

and answering yes to the three questions. (Substitute devel, staging, or stable for <branch> in the above command.)



Installing without Internet

To install Wine on an Ubuntu machine without internet access, you must have access to a second Ubuntu machine (or VM) with an internet connection to download the Wine .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 clean
sudo apt-get --download-only install winehq-devel
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

The same instructions can also be used for an offline installation of the `winehq-staging` packages.

Compiling WoW64

Ubuntu's implementation of Multiarch is still incomplete, so for now 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 Biarch Wine On Ubuntu for detailed instructions for Ubuntu using LXC, and Building Wine for general information.

See Also


This page was last edited on 8 July 2020, at 23:03.