I am running into problems on my EC2 box running Python in an elastic-beanstalk container. In order to debug the problem, I need to attach a debugger to it and debug python with python symbols.
When I attach GDB to the process, I get this error:
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
Attaching to program: /usr/bin/python, process 31238
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols
from /usr/lib/debug/lib64/ld-2.12.so.debug...done. done. Loaded
symbols for /lib64/ld-linux-x86-64.so.2 0x00007ffec3759a63 in ?? ()
Missing separate debuginfos, use: debuginfo-install
python-2.6-2.23.amzn1.noarch
However, when I run debug-info install python-2.6-2.23.amzn1.noarch, it doe
[root@1.2.3.4]# debuginfo-install python-2.6-2.23.amzn1.noarch
Loaded plugins: auto-update-debuginfo, fastestmirror, priorities, update-motd
enabling amzn-main-debuginfo
enabling amzn-updates-debuginfo
Loading mirror speeds from cached hostfile
* amzn-main: packages.us-east-1.amazonaws.com
* amzn-main-debuginfo: packages.us-east-1.amazonaws.com
* amzn-updates: packages.us-east-1.amazonaws.com
* amzn-updates-debuginfo: packages.us-east-1.amazonaws.com
amzn-main | 2.1 kB 00:00
amzn-main-debuginfo | 1.9 kB 00:00
amzn-updates | 2.3 kB 00:00
amzn-updates-debuginfo | 1.9 kB 00:00
Checking for new repos for mirrors
Could not find debuginfo for main pkg: 1:python-2.6-2.23.amzn1.noarch
No debuginfo packages available to install
Any idea how to get these symbols on the box?
Best Answer
As per amazon support:
The Amazon Linux images all have the repository for debuginfo disabled by default as they would not be needed in production. You can enable them in two ways:
Edit the two following files and change
enabled=0
toenabled=1
in the debuginfo section of:Then run the following command to install the debuginfo for python 2.6:
To temporarily enable the same repositories just for the case of the install that you need, you could run the following command on it's own:
For Amazon Linux 2 instead either:
/etc/yum.repos.d/amzn2-core.repo
as above before installing