Amazon Linux: "Apt-Get: Command Not Found"

Amazon Linux: apt-get: command not found

If you're using Amazon Linux it's CentOS-based, which is RedHat-based. RH-based installs use yum not apt-get. Something like yum search httpd should show you the available Apache packages - you likely want yum install httpd24.

Note: Amazon Linux 2 has diverged from CentOS since the writing of this answer, but still uses yum.

AWS EC2 : sudo: apt-get: command not found error

Install node version manager (nvm) by typing the following at the command line.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash

Use nvm to install Node.js because nvm can install multiple versions of Node.js and allow you to switch between them.

Activate nvm by typing the following at the command line.

. ~/.nvm/nvm.sh

Use nvm to install the version of Node.js you intend to use by typing the following at the command line.

nvm install 4.4.5

Installing Node.js also installs the Node Package Manager (npm) so you can install additional modules as needed.

Test that Node.js is installed and running correctly by typing the following at the command line.

node -e "console.log('Running Node.js ' + process.version)"

This should display the following message that confirms the installed version of Node.js running.

Running Node.js v4.4.5

More Info : https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html

How to install apt-get package in Amazon Linux machine

well figured out these commands hence answering,these commands will install apt-get and run docker as ec2 user

sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker info
docker run -it --rm tarunkumard/gatling:FirstScript

Amazon AWS Cloud9 sudo apt-get command not found

The old c9.io was based on Ubuntu, but AWS cloud9 is based on Amazon Linux so you should use yum to update now.



Related Topics



Leave a reply



Submit