Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to install gcc on ubuntu amazon EC2 instance

I'm trying to install gcc and g++ compiler on my amazon ec2 instance. but when i type the command on the instance

sudo apt-get install gcc

I got stuck when I try to connect the amazon archives. I wait here a little bit:

0% [Connecting to us-west-2.ec2.archive.ubuntu.com (54.231.160.74)]

and then get a bunch of errors about not being able to connect to the archives. Does anyone know the solution? Thanks.

Errors:

Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libasan0 i386 4.8.2-19ubuntu1
Could not connect to us-west-2.ec2.archive.ubuntu.com:80 (54.231.160.74), connection timed out


E: Failed to fetch http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/main/e/eglibc/libc6-dev_2.19-0ubuntu6_i386.deb  Unable to connect to us-west-2.ec2.archive.ubuntu.com:http:
like image 638
arikan Avatar asked May 09 '14 09:05

arikan


People also ask

Which command is used to install GCC in Linux?

Execute the below command to install it: sudo apt install build-essential.

Is GCC available for Ubuntu?

Installing GCC: GCC and all the required build tools can be installed very easily on Ubuntu as all the required packages are available in the official package repository of Ubuntu. Ubuntu also provides the build-essential meta package that installs all the required packages all at once.


1 Answers

Okay got the answer, I needed to arrange the outbound rules for my security group.

enter image description here

like image 200
arikan Avatar answered Oct 04 '22 14:10

arikan