简体   繁体   中英

sudo apt-get install apache2 on ec2 instace type: ami-e0efab88 fails

I've created an ec2 instance debian-wheezy-amd64-hvm-2015-01-28-ebs (ami-e0efab88)

aws ec2 run-instances --image-id myimage --security-group-ids mysecuritygroup --count 1 --instance-type t2.micro --key-name mykey --query 'Instances[0].InstanceId'

then connected to it and tried to install apache2 on it

sudo apt-get install apache2

got the following

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package apache2

Note: creating a GCE instance debian-7-wheezy-v20131014 and running the same command works perfectly

What am I missing?

as mentioned in the comments, the rule is always to run

sudo apt-get update

before installing any software with apt-get package

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM