When I run sudo apt install top
, I get E: Unable to locate package top
I searched packages.ubuntu.com for top package on 32 bit Ubuntu 16.04 LTS, but there is none.
I wonder if it's correct or I'm missing something.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityWhen I run sudo apt install top
, I get E: Unable to locate package top
I searched packages.ubuntu.com for top package on 32 bit Ubuntu 16.04 LTS, but there is none.
I wonder if it's correct or I'm missing something.
It is probably installed with the procps
package. It is also common in all *NIX OSes. If you really need to find what it is installed with, install apt-file
first:
sudo apt install apt-file
sudo apt-file update
If you run a which
command it will return the folder that it is installed into:
$ which top
/usr/bin/top
Then do a search like this:
apt-file search --regexp '/top$'
It will return a list like this:
broctl: /usr/share/broctl/scripts/helpers/top
crossfire-maps: /usr/share/games/crossfire/maps/santo_dominion/magara/well/top
crossfire-maps-small: /usr/share/games/crossfire/maps/santo_dominion/magara/well/top
liece: /usr/share/emacs/site-lisp/liece/styles/top
lubuntu-extra-sessions: /usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top
lxpanel: /etc/xdg/lxpanel/two_panels/panels/top
procps: /usr/bin/top
quilt: /usr/share/quilt/top
trn4: /usr/share/doc/trn4/examples/univ/top
trn4: /usr/share/trn4/HelpFiles/top
Then all you have to do is match the folder, and that is the package at the beginning of the line.
Or, you could combine the statement as one and it should return a more exact result:
$ apt-file search --regexp "^$(which top)$"
procps: /usr/bin/top
Hope this helps!
dpkg -S /usr/bin/top
to find out in which installed package the top binary lives. No need to install apt-file
.
apt-file
or packages.ubuntu.com.
apt-get install procps
is the not-so-front-and-center solution here I was looking for.
Feb 14, 2019 at 20:37
If you are using http://packages.ubuntu.com/ to find packages that provide top
, you need to search for top
in the "Search the contents of packages" section. The results of such a search are:
File Packages
/etc/xdg/lxpanel/two_panels/panels/top lxpanel
/usr/bin/top procps
/usr/share/broctl/scripts/helpers/top broctl
/usr/share/doc/trn4/examples/univ/top trn4
/usr/share/emacs/site-lisp/liece/styles/top liece
/usr/share/games/crossfire/maps/santo_dominion/magara/well/top crossfire-maps, crossfire-maps-small
/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top lubuntu-extra-sessions
/usr/share/quilt/top quilt
/usr/share/trn4/HelpFiles/top trn4
In your case, you are most likely looking for the package that provides /usr/bin/top
, which is procps
.
Unsurprisingly, the search results are identical to the ones found using apt-file
as mentioned in @Terrance's answer.
top
should already be installed. You just runtop
from the command line. Is there something else you are looking for likehtop
or one of the others?top
orsudo top
top
is already installed, I wonder why it is not in repo