Translated message

A translation of this page exists in English.

RHEL の gdb コマンドが失敗して Fatal Python error: Py_Initialize: Unable to get the locale encoding エラーが出力される

Solution In Progress - Updated -

Issue

  • GNU デバッガーコマンド gdb を実行すると失敗し、以下のエラーが出力されます。

    $ 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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content