ThomasReggi asked:
I am running a Amazon ec2 instance on amazon’s linux.
Whenever I run anything sudo yum
it give me this:
sudo: yum: command not found
ec2-user$ rpm -qf /usr/bin/yum
yum-3.2.29-30.24.amzn1.noarch
ec2-user$ which yum
/usr/bin/yum
which yum
while in root gives:
root$ which yum
/usr/bin/which: no yum in (/sbin:/bin:/usr/sbin:/usr/bn:/usr/local/bin:/opt/aws/bin)
This is a new ec2 instance two days old. When I first logged in I ran sudo yum update
and everything wen’t well. What changed?
My answer:
You have a typo in root’s PATH
.
Instead of /usr/bin
the path entry reads /usr/bn
.
I can’t be sure if this is because Amazon has screwed up something, or you made a change to your PATH
and accidentally deleted the i
, but that appears to be the cause of the problem.
View the full question and any other answers on Server Fault.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.