Score:0

Difference between installing .deb files by CLI and double clicking

mx flag

I've often been recommended to install the .deb files by CLI (i.e., by sudo dpkg -i filename) than by simply double clicking the .deb file. I dont see why is it recommended so. Also, I'm curious to know what is the difference between these two modes of installation.

ChanganAuto avatar
us flag
The end result is the same.
cn flag
Ray
No difference. Since you said you've "often been recommended", perhaps you should ask whoever recommended it to you instead? I guess some people like seeing what it's doing instead of a simple progress bar.
muru avatar
us flag
In this case, the software centre is like `gdebi` - it will install missing dependencies, which `dpkg -i` doesn't do.
raj avatar
cn flag
raj
@muru I don't think Ubuntu Software (double click) will automatically install the dependencies to an offline .deb file like GDebi does. Whenever I tried to install an offline .deb file with double click, it failed. With GDebi, it succeeded.
muru avatar
us flag
@raj which version of Ubuntu? It might depend on which Ubuntu Software you have. The snap-based one might not work, I'm not sure about that.
raj avatar
cn flag
raj
@muru I'm indeed talking about the snap-based one, because that's the one in current versions. I have Ubuntu 20.04.
Score:5
us flag

dpkg cannot automatically install the dependencies, whereas a GUI .deb installer (e.g. GDebi) installs all the required dependencies.

This is why, if you use dpkg without installing the dependencies first, you may end up with broken packages (which can be easily fixed in most cases with sudo apt install -f).

To automatically get all the dependencies with command line, use the following command,

sudo apt install ./path/to/package.deb

Practically, this has no difference from installing with GDebi.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.