Why most of deb files I am trying to install are not supported by Ubuntu Software? [duplicate]

I tried to install some .deb files in Ubuntu 20.04 from GitHub and other internet sources, but when I open it with Software Install it gives me this problem (Failed to install file: not supported). The only way for me to install them is to go to the downloaded file and do sudo dpkg -i file.deb.

Can anyone help? I don't know what to do and I don't want to use the terminal every time.

Any help would be appreciated, thanks

EDIT: that's NOT a problem with .deb in Ubuntu, it is a problem with Software install. I can install every .deb through the terminal but not with Software install, and Ubuntu suggests to install .deb with Software install. That's not a dependencies problem or anything similar, that's an issue with installing .deb WITH Software install and I would like to know how I can fix Software installer


Solution 1:

If you are using firefox, and opted to download and open the file with Software Install, what has likely occurred is the file has been downloaded into the /tmp/mozilla_userX directory, from which the Ubuntu Software Installer is not able to install anything.

Opting to save the file first before opening with Software Install should solve this issue.

For files that have already been downloaded, moving the file out of the /tmp/mozilla_userX directory into a sub-directory of /home/user/, e.g. Downloads, should solve the problem.

Solution 2:

If you're looking for a reliable GUI way to install .deb files, use gdebi.

To see if you already have it installed on your system...

dpkg -l gdebi | grep ii

If it's not there, install it this way...

sudo apt-get update
sudo apt-get install gdebi

Then get the "Properties" of any .deb file, and set the default "Open With" application as gdebi. Now you can just double-click on .deb files to install them.

enter image description here

Note: gdebi may not operate properly if .deb files are on the desktop.

Update #1:

gdebi is broken in Ubuntu 21.04.