Red Wine in a GlassHow to Install Wine on Debian 8CSS HTML Validator Logo
HOME About
Debian 8 screen shot

How to Install Wine on Debian 8

Prepare Debian to Install Wine

Before installing Wine, sudo and apt-transport-https must be installed. However, Debian will attempt to install these from a CD or DVD, which will fail if you installed from a USB drive and have no installation optical disk. One way to avoid that problem is to disable access to CDROM repositories.

Disable CDROM repositories

If you installed Debian from an optical disk, instead of following the procedure in this section, you can load the installation disk into an optical drive and continue with the procedure in Install sudo and apt-transport-https.

If you are not using a Debian installation optical disk to install sudo and apt-transport-https, do the following to remove the option to access local CDROM repositories. With CDROM repositories unavailable, Debian will download missing packages from online repositories.

An alternative to the following procedure for making CDROM repositories unavailable, for those who are comfortable editing system files with a command line editor such as nano or vim, is to insert a # character at the beginning of the line in /etc/apt/sources.list that begins with "deb cdrom: …". The added # will comment out that line and disable CDROM repositories.

Install sudo and apt-transport-https

Open a Terminal window and login as super user.

$ su -l

Update the package database and do the installations.

# apt-get update
# apt-get install sudo
# apt-get install apt-transport-https

Enable sudo for your user account

In the following command, replace your-user-name by your own user name.

# adduser your-user-name sudo

Log out of the root account and close the Terminal window.

# exit
$ exit

Close any open apps.

In order to activate sudo for your user name, Restart your Computer.

When logged in again, continue from here to verify sudo is installed and properly configured.

-------- Waiting for computer to restart --------

To verify you can now use sudo, open a Terminal session and issue the following command.

$ sudo echo 'Hello'

The test is successful if, after requesting and receiving your password, "Hello" is displayed.

Check installed architectures

Verify 64-bit architecture. The following command should respond with "amd64".

$ dpkg --print-architecture

See if 32-bit architecture is already installed. The following command should respond with "i386"

$ dpkg --print-foreign-architectures

If it does not display "i386", execute the following.

$ sudo dpkg --add-architecture i386

Re-check with

$ dpkg --print-foreign-architectures

Add the WineHQ Debian repository

Get and install the repository key.

$ wget -nc
$ sudo apt-key add winehq.key

Use the next three Terminal commands to add the Wine HQ repository for Debian 8 Jessie to the operating system's list of repositories.

$ echo 'deb jessie main' > /tmp/winehq.list

$ sudo cp /tmp/winehq.list /etc/apt/sources.list.d/

$ rm /tmp/winehq.list

Execute the next command to update the package database, but …

… if you are using a Debian installation disk as a local repository, first load your disk into the optical drive.

$ sudo apt update

Install Wine

The next command will install Wine Stable. If you prefer Wine Development or Wine Staging, replace winehq-stable with either winehq-devel or with winehq-staging.

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

Verify the installation succeeded.

$ wine --version