How to install Anydesk on Ubuntu (The right way)

How to install Anydesk on Ubuntu (The right way)

If ever try to install Anydesk on Ubuntu using dpkg command ( dpkg -i anydesk_6.1.1-1_amd64.deb ) you probably got the following error:

Unpacking anydesk (6.1.1) ...
dpkg: dependency problems prevent configuration of anydesk:
anydesk depends on libminizip1; however:
Package libminizip1 is not installed.
anydesk depends on libgtkglext1; however:
Package libgtkglext1 is not installed.

dpkg: error processing package anydesk (--install):
dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Errors were encountered while processing: anydesk

Cause:

This is because dpkg doesn't solve dependencies, and by default Ubuntu do not install the following packages:
hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
` Processing triggers for mime-support**

Solution:

So instead of using dpkg, use apt command like so:
sudo apt install ./anydesk_6.1.1-1_amd64.deb
Using this command, required dependencies will be install before installing Anydesk.