6

I'm trying to install htop on my server (ubuntu 14.04). Here is the command:

sudo apt-get install htop

But it throws:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package htop

Noted that it throws E: Unable to locate package .... for everything I would like to install (like phpmyadmin). What's the problem and how can I fix it?

stack
  • 551
  • 3
  • 10
  • 14

1 Answers1

7

The htop package is in the repository 'universe'. The following commands should work to install it.

sudo add-apt-repository universe

sudo apt-get update
sudo apt-get install htop

or as root

add-apt-repository universe

apt-get update
apt-get install htop
sudodus
  • 45,126
  • 5
  • 87
  • 151
  • The result of your first command: `'universe' distribution component enabled for all sources.` – stack Dec 18 '17 at 07:03
  • I use `htop` and I install it as described here. What is the output of your update and install commands? – sudodus Dec 18 '17 at 07:07
  • update happens successfully, but `E: Unable to locate package htop` is still there when I try to install htop. Can you please take a look at my server if I give you user and password? – stack Dec 18 '17 at 07:09
  • How would you send me user and password in a secure way? Maybe you can use gpg encryption and my public key, that you find at https://help.ubuntu.com/community/mkusb/gui/tarball – sudodus Dec 18 '17 at 07:17
  • My server is empty *(almost)*, so I don't care about security, if you give me your email, I will send it to you. Just do you have Putty installed on your computer ? – stack Dec 18 '17 at 07:20
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/70423/discussion-between-sudodus-and-stack). – sudodus Dec 18 '17 at 07:38
  • Emaul has been sent – stack Dec 18 '17 at 07:41
  • did you get my email? – stack Dec 18 '17 at 07:42
  • @stack, Yes. Please see my messages in the chat room (and let me know if things are working now). – sudodus Dec 18 '17 at 07:56
  • 1
    In case anyone gets the error `add-apt-repository command not found`, first install the software properties common: `apt-get install software-properties-common`. – aderchox Aug 11 '20 at 07:04