I installed Ubuntu 12.04 on my instance and am trying to install packages using apt-get, but I am getting the following error:
sudo: apt-get: command not found
How do I fix this?
After installing the APT package, check the /usr/bin/ directory to ensure if it had properly installed. If the file is empty, then run the locate apt-get command again. If no result is shown, there is no alternative but to reinstall the operating system. This might fix the problem.
The most common reasons an instance might boot in emergency mode are: A corrupted kernel. Auto-mount failures because of incorrect entries in the /etc/fstab.
Check your security group rules. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Instances, and then select your instance. On the Security tab at the bottom of the console page, under Inbound rules, check the list of rules that are in effect for the selected instance.
Try replacing apt-get
with yum
as Amazon Linux based AMI uses the yum
command instead of apt-get
.
I guess you are actually using Amazon Linux AMI 2013.03.1 instead of Ubuntu Server 12.x reason why you don't have apt-get tool installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With