Ubuntu – Sudo: command not found

Apache2sudo

I'm new to this. I'm trying to install apache2 on an Ubuntu 15.04 server.
Running as root.

But when giving the command:

$ sudo apt-get install apache2
-bash: sudo: command not found

Can anyone point me in the right direction? Thanks in advance.

EDIT:

root@dev:~# whoami
root

root@dev:~# apt-cache policy sudo
N: Unable to locate package sudo

root@dev:~# apt-get install sudo
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package sudo

root@dev:~# apt-cache policy sudo
N: Unable to locate package sudo

root@dev:~# sudo apt-get install apache2
-bash: sudo: command not found

root@dev:~# apt-get install apache2
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package apache2

EDIT:

Ran; apt-get update and then tried again. Worked!

Best Answer

As you are root you shouldn't need sudo to run the command. Try running the commands without sudo as in apt-get install apache2 for example.

Source: experience

Related Question