Today's article is about installing applications with dpkg...

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,866
Reaction score
10,451
Credits
98,131
You can still use dpkg to install packages. I don't know why I'd want to, because apt is a better tool (in my opinion). There's still a time and place when folks might use dpkg, thus the article. It's also there as a source of knowledge because you can do it if you want to.

So, I wrote about it. I also cover removing software with dpkg. That can be a little muddier but it's not a difficult thing to do. You can even purge with dpkg, instead of just leaving the configuration files on your storage media. There are options...


Once again, it's a fairly long article. If you follow along, you'll go on a journey! You'll laugh! You'll cry! You'll celebrate victory as you install and remove an application in the terminal - while using dpkg. Then, after it's all said and done, you can clean up after yourself and nobody will be the wiser. Except for you... You'll know what happened. You'll know your little secret!
 


One issue with using: apt install -f, to get the dependencies, is that the package needs to be in the repositories for apt to be able to complete the installation with the dependencies. If by chance, the xnview program (as the example in the article) did have dependencies, they may not have been findable by apt in a distro that uses the apt package manager because xnview may not be in the distro's repos. For example, searching for xnview in debian here: https://packages.debian.org/search?keywords=xnview&searchon=names&suite=all&section=all,
the output is:
Code:
You have searched for packages that names contain xnview in all suites, all sections, and all architectures.
Sorry, your search gave no results

With the particularity of the xnview example in the article, it all succeeds because, as mentioned, there's no dependencies. It's the judicious choice of package that enables it to work, but the use of apt to "fix" a dependency issue if it arose, is not generalisable to all possible cases.

The upshot is that using: apt install -f, is not universally applicable to all installations made by: dpkg -i <pkg.deb>, since, in some situations when a package has dependencies, but is not in the repository of the distro, those dependencies have to be sought out and individually installed for an ultimately successful installation. The downside is of potential "dependency hell" as dependency of dependencies may mount up for the user to chase down, which was one motivation for the development of package managers in the first place of course.
 
One issue with using: apt install -f, to get the dependencies, is that the package needs to be in the repositories for apt to be able to complete the installation with the dependencies.

I'm pretty sure I typed that out, but it's not in the article, so I must have missed it. I'll get that edited in there at some point. Probably sooner than later. Thanks!

And, yeah, I picked XnView MP 'cause it had no dependencies and was a fine example of when dpkg would work. Frankly, I have no idea why people still use dpkg.

Right now, I'm busy enjoying a new keyboard - a dirt cheap keyboard on top of that. For the price, it's brilliant. The other keyboard drank a beer. It's not the first time I've lost a keyboard to beer. There was one laptop that needed three replacement keyboards. For the price, this keyboard is brilliant - and it's supposed to be waterproof.

I refuse to buy expensive keyboards, for obvious reasons. Keyboards at my house tend to be alcoholics.

It's seriously a good keyboard for the price. I can't speak to longevity or sobriety, but I'm impressed.

 

Members online


Latest posts

Top