How to install wine 5.0.3 stable from winehq on Linux Mint 20 or Ubuntu

The wine package in the Ubuntu Linux repository is version 5, but running applications from it, cannot connect to the internet. It was found that upgrading to wine version 5.0.3 in the winehq repository solved this error. To install wine version 5.0.3 from winehq, open a terminal window and enter the following commands:

$ sudo dpkg --add-architecture i386 <enter>

$ wget -nc <enter>
$ sudo apt-key add winehq.key <enter>

Add the repository
$ sudo add-apt-repository 'deb focal main' <enter>

$ sudo apt-get update <enter>

$ sudo apt install --install-recommends winehq-stable <enter>

After installing wine-5.0.3 version, the network error is resolved.