Score:14

How can I show how a package can be installed, manually

in flag

Sometimes, when I run a command that belongs to an apt package that isn't installed, it'll show how it can be installed. For example:

root@localhost:~# traceroute

Command 'traceroute' not found, but can be installed with:

apt install inetutils-traceroute  # version 2:1.9.4-11, or
apt install traceroute            # version 1:2.1.0-2

Is there any way to show this manually, since when I try to run traceroute with something like subprocess and python, this isn't shown?

Score:15
cn flag
raj

You can display this with:

/usr/lib/command-not-found traceroute
in flag
This also seems useful to find out which package a command belongs to that _is_ installed.
raj avatar
cn flag
raj
@leftaroundabout Hm... for installed command, it shows me only the **location** of these commands (like `/usr/sbin/traceroute`); doesn't show which package the command belongs to.
in flag
Ah, it shows the location if the command is installed system-wide, but if it's built locally from source then it shows the package that would provide the command of the same name.
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.