Thu Sep 30 2021·1 min read
Photo by Jossemio
The AWS EC2 "apt-get: command not found" error occurs when we try to use the
apt-get package manager on an EC2 instance that is launched with a non-Debian
Amazon Machine Image.
To solve the "apt-get: command not found" error replace
sudo yum install curl. The
yum package manager is used in all
Amazon Linux AMIs.
sudo yum install curl
Yumis the primary package manager for
Amazon Linux AMIsand Red Hat Linux systems.
If you still get the error after trying the
yum command, you have to verify
which AMI your EC2 instance is launched with:
Instance detailssection and open the
AMI IDin a new tab
Public imagesfrom the drop down filter and look at the details of your AMI