1

I tried installing gdb and pstack on EC2 Instance with Amazon Linux AMI (it was not installed by default), and it's not working.

Tried:

[ec2-user@ip-172-21-ab-xyz ~]$ sudo yum install gdb
Loaded plugins: priorities, update-motd, upgrade-helper
No package gdb available.
Error: Nothing to do

[ec2-user@ip-172-21-ab-xyz ~]$ sudo yum install pstack
Loaded plugins: priorities, update-motd, upgrade-helper
No package pstack available.
Error: Nothing to do

Tried to manually put gdb tar on AMI and compile it, but it didn't work.
Not sure where to get RPMs for AMI. Where to download the packages from ?

Can anyone guide me on how to install GDB and pstack on AMI ?

2 Answers 2

2

The gdb package is available from the Amazon Linux AMI repositories. The repositories should be configured by default. In your case I suspect that you instance cannot contact the repositories so it cannot download the package. To see what repositories you have enabled run:

sudo yum repolist

This should return something like:

Loaded plugins: priorities, update-motd, upgrade-helper
repo id                        repo name          status
amzn-main/latest               amzn-main-Base     5,017+2
amzn-updates/latest            amzn-updates-Base  111
repolist: 5,136

If you don't have these repos listed, then make sure you instance can get to the repository (usually allow access to the internet). Also, make sure you haven't made any changes to the files in the /etc/yum.repos.d/ directory.

The pstack command is included in the gdb package, so a seperate package for pstack is not needed.

-Heath

2
  • I am not seeing these repositories listed, what should I do? What do you mean by allowing access to internet? The instance has access to internet (I am able to download other packages).
    – K.K
    Oct 10, 2014 at 7:35
  • What repositories do you have listed? The repsositories are configured in the /etc/yum.repos.d directory. Make sure the amzn-main and amzn-updates repositories are enabled.
    – Heath
    Oct 10, 2014 at 16:39
1

I would suggest you to kindly execute the below command:

sudo yum groupinstall "Development Tools"

This will install all the tools required for development and build on Amazon AMI.

More on Amazon Development tools can be found here.

2
  • 1
    Is there an actually useful article/page on that anywhere? Most Amazon pages are just marketing crap. They don't even list the packages that are included in the group.
    – Dan M.
    Feb 9, 2022 at 12:01
  • @DanM. I agree with you, that is how the product is sold. To simplify this, most of the information is available when installing from YUM utility using the helper command for each of the package. That will give you the list of packaged going to be installed. I hope this helps. Feb 9, 2022 at 23:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .