I am trying to install wine. Following the commands indicated for Wine installation that I placed with bullets. I received a WARNING stating "apt-key is deprecated". I am not sure what to do here.

Here are the steps I did:

yd@yd:~$ sudo dpkg --add-architecture i386
[sudo] password for yd:
yd@yd:~$ wget -nc https://dl.winehq.org/wine-builds/winehq.key 
  sudo apt-key add winehq.key

--2021-06-17 18:04:43--  https://dl.winehq.org/wine-builds/winehq.key
Resolving dl.winehq.org (dl.winehq.org)...,,, ...
Connecting to dl.winehq.org (dl.winehq.org)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3220 (3.1K) [application/pgp-keys]
Saving to: ‘winehq.key’
winehq.key          100%[===================>]   3.14K  --.-KB/s    in 0s      
2021-06-17 18:04:43 (8.93 MB/s) - ‘winehq.key’ saved [3220/3220]
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
yd@yd:~$ sudo apt-key add winehq.key
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

After this , I am supposed to add two other commands:

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

I do not know what to do about this warning message.

  1. Should I continue with the last two commands
  2. should I deal with the warning message. if yes, how?
  3. can I revert the installation command I already did? if yes, how?
  • Just curious, but which Ubuntu version are you using?
    – Thomas Ward
    Jun 18 at 1:37
  • I am using Ubuntu 20.04. Jun 18 at 2:00
  • If you're running focal or 20.04, why you be wanting to running a command geared for bionic or 18.04? Why aren't you just installing wine from default Ubuntu repositories? rather than using what appears to be a build for an older/bionic release in your newer/focal system? packages.ubuntu.com/… You're missing details
    – guiverc
    Jun 18 at 3:20
  • If you are ok with the security implications, you can ignore the warning. It's deprecated but it still works. However there is no need to add a repo to install wine. Jun 18 at 3:26
  • Simple ignore it, its a just warning. If you are installing Wine on 20.04 LTS, then you should have focal instead of bionic in 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' line.
    – N0rbert
    Jun 18 at 7:04

You are trying to install Wine directly from their repository, and not from Ubuntu's. You only have installed the gpg key, with a warning (not an error).

The easieast path would be to install Wine from Ubuntu's repository (you problably don't need the latest updates). Type on the terminal:

sudo apt install wine


sudo apt install wine64

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.