Linux – Enabling apt-get on a default Amazon EC2 instance which has yum installed

aptlinuxrepositoryunixyum

I'd like to call something like:

sudo yum install apt

to enable me to use apt-get as well as yum for installation.

However this doesn't work. I get the following back:

Loaded plugins: fastestmirror, priorities, security, update-motd
Loading mirror speeds from cached hostfile
 * amzn-main: packages.eu-west-1.amazonaws.com
 * amzn-updates: packages.eu-west-1.amazonaws.com
Setting up Install Process
No package apt available.
Error: Nothing to do

It looks like it requires making the default Amazon EC2 instance aware of repositories.

In a nutshell: how I can simply enable use of apt-get instead of just yum?

Best Answer

apt-get is a Debian tool. yum (and rpm) are Red Hat tools. They are not compatible; neither are the packages which they install.

If you want to use apt-get, use a Debian (or Ubuntu) image instead of Red Hat (or CentOS, or whatnot).