This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

aarch64-none-linux-gnu-gdb ( version 12.3) cannot run, with python errors

Hi,

I download the newest aarch64 linux toolchain(version 12.3) from:

https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-aarch64-arm-none-eabi.tar.xz?rev=420215e7c8d14d90b5227eb5486d8c75&hash=315EF6A79273453E2306E2E9F52D80E1

When I exec the command

aarch64-none-linux-gnu-gdb

It shows:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '/usr/local/bld-tools/bld-tools-virtual-env/bin/python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/local/bld-tools/bld-tools-virtual-env/bin/python'
sys.base_prefix = '/usr'
sys.base_exec_prefix = '/usr'
sys.executable = '/usr/local/bld-tools/bld-tools-virtual-env/bin/python'
sys.prefix = '/usr'
sys.exec_prefix = '/usr'
sys.path = [
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f1c07ce7c00 (most recent call first):
<no Python frame>

My machine is ubuntu2204 and the default python is 3.10.12.

So I set the PYTHONPATH and PATHONHOME to:

export  PYTHONPATH=/usr/bin/:~/.local/lib/python3.10/:/usr/lib/python3.10/

export PYTHONHOME=/usr/bin/

Then it shows:

Fatal Python error: init_sys_streams: can't initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
File "/usr/lib/python3.10/io.py", line 54, in <module>
ImportError: cannot import name 'text_encoding' from 'io' (unknown location)

Does Anybody have ideas? Thanks a lot.

Br,

Yingchun Li