20
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package winehq-stable
karel
  • 110,292
  • 102
  • 269
  • 299
xxx
  • 201
  • 1
  • 2
  • 3
  • 2
    Could you please add a little more detail? What *exactly* did you do, what did you want to expect to happen and what happened instead? Did you encounter any warning or error messages? Please reproduce them *in their entirety* in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. Please **[edit]** your post to add information instead of posting a comment. (see [How do I ask a good question?](/help/how-to-ask)) – David Foerster Dec 10 '17 at 10:52
  • The package is `wine-stable`, afaict. – muru Dec 13 '17 at 03:11

5 Answers5

30

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.

ThunderBird
  • 1,915
  • 13
  • 19
  • 31
God OfKnockers
  • 421
  • 4
  • 4
22

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-23.10.

To install winehq-stable 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

karel
  • 110,292
  • 102
  • 269
  • 299
12

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.

Chai T. Rex
  • 5,126
  • 1
  • 24
  • 48
  • 1
    Worked after using `sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 76F1A20FF987672F` because adding `Release.key` alone was not enough apparently. – Axel Köhler Jun 23 '21 at 06:07
3

Add 32 bit architecture and WINE's key

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

To add WINE repository on Ubuntu 20.04:

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

To add WINE repository on Ubuntu 18.04:

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

To add WINE repository on Ubuntu 16.04:

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

Update APT cache and install WINE:

sudo apt update
sudo apt install --install-recommends winehq-stable
Kulfy
  • 17,416
  • 26
  • 64
  • 103
Recki
  • 31
  • 1
2

Looks like I've finally found the solution.

  1. Run command to enable 32 bit architecture:

    sudo dpkg --add-architecture i386
    
  2. Download and install the repository key via this command:

    wget -nc https://dl.winehq.org/wine-builds/winehq.key
    sudo apt-key add winehq.key
    
  3. Add wine repository via command (for Ubuntu 19.10):

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

    NOTE: You may replace "eoan" in the code with:

    bionic for Ubuntu 18.04 and Linux Mint 19.x
    xenial for Ubuntu 16.04 and Linux Mint 18.x
    
  4. Add PPA for the required libfaudio0 library:

    For Ubuntu 18.04, Linux Mint 19.x, and Ubuntu 19.04 only, as higher Ubuntu releases already have libfaudio0 in the main repositories.

    sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
    
  5. Finally install Wine 5.0 stable via command:

    sudo apt update && sudo apt install --install-recommends winehq-stable
    

    (Optional) After successfully installed Wine 5.0, you may remove the PPAs by launching Software & Updates utility and navigating to Other Software tab.

Thanks to this guy!

zx485
  • 2,249
  • 11
  • 24
  • 34
  • This worked on my ubuntu 18.04 system. The `libfaudio0` bit had been tripping me up. – eos Oct 04 '20 at 18:45