E: Unable to locate package winehq-stable

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package winehq-stable

The winehq-stable package is not in the default Ubuntu repositories, so apt is unable to locate it. In Ubuntu 17.10 install wine-stable instead. The wine-stable version is 2.0 in Ubuntu 17.10. The wine-stable version is 3.0 in Ubuntu 18.04, 18.10, 19.04, 19.10, 20.04, 20.10, 21.04, 21.10 and 22.04. Open the terminal and type:

sudo apt install -y wine-stable  

Other suggested packages to install along with wine-stable are: dosbox playonlinux winbind wine-binfmt winetricks


You don't have the necessary setup work completed to add that package. According to the WineHQ Wiki's Ubuntu page:

  1. Open a terminal by pressing Ctrl+Alt+T.
  2. If your computer is 64-bit, add the 32-bit architecture:

    sudo dpkg --add-architecture i386 
    
  3. Add the repository:

    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/
    
  4. Update repositories:

    sudo apt-get update
    
  5. Install winehq-stable:

    sudo apt-get install --install-recommends winehq-stable
    
  6. If apt-get mentions missing dependencies, install them and retry the install of winehq-stable.


The name of the install package is different from that stated in the wiki. Instead of typing:

sudo apt-get install --install-recommends winehq-stable

you type:

sudo apt-get install --install-recommends wine-stable

That will install the proper package. I just installed Wine and that's how this works.