0

I was running few commands and suddenly my apt-get command stopped working, reporting command not found error.

Kindly help. I am blocked due to this.

I tried commands from this answer - askubuntu question for unmet dependencies

  • 3
    Please [edit] your question to include what exactly it is which you are running and what the error is. –  Sep 07 '16 at 17:01

1 Answers1

-1

"Command not found" is the common response for a command you're not authorized to use. In this case, apt-get is a system command, and requires root privilege; you should type sudo apt-get and whatever you're trying to install, remove, etc. You'll be prompted for your user password, and assuming your'e on the sudoers list, the command will then execute with root privilege.

Zeiss Ikon
  • 5,128
  • even for root it is not working – Rakesh Yadav Sep 07 '16 at 17:12
  • It would return permission denied anyway... – Zanna Sep 07 '16 at 17:20
  • @Zanna with the information we have, I don't know how you can predict that. Use of sudo, in my experience, lets the sudoer do anything a logged-in root could do (if such a thing still existed in as-distributed Ubuntu). – Zeiss Ikon Sep 07 '16 at 17:25
  • I mean, try it, if you run apt-get without sudo it will not return command not found, but, permission denied etc – Zanna Sep 07 '16 at 17:30
  • On my Kubuntu installations, both 14.04 and 16.04, if I type a command I don't have the privilege for, I get the "not found" version of the error. "Permission denied" occurs when I try to do things like write to a folder I don't own. – Zeiss Ikon Sep 07 '16 at 17:45
  • @ZeissIkon Can you give an example of such a command that does that? I am curious and would like to try it on my machine. – edwinksl Sep 07 '16 at 18:02
  • Not at the moment; I'm at work, not near my Kubuntu systems. – Zeiss Ikon Sep 07 '16 at 18:06
  • 1
    Wrong. Super-user commands can still be discovered by regular users. More specifically, apt-get has commands and modes that don't require super-user privileges at all. -1 – David Foerster Oct 01 '16 at 01:49