RHEL gdb command fails with Fatal Python error: Py_Initialize: Unable to get the locale encoding
Issue
-
Running The GNU Debugger command
gdb
fails with the following error.$ gdb Fatal Python error: Py_Initialize: Unable to get the locale encoding File "/usr/lib64/python2.7/encodings/__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax Current thread 0x00007fb99529dbc0 (most recent call first): Aborted
Environment
- Red Hat Enterprise Linux 8
- Python 2.7.17
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.