Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2555  / 3 Years ago, thu, september 23, 2021, 2:33:05

Trying to get arm toolchain working on my fresh installed ubuntu 22.04. After fixing some symlinks for libncurses it now complains about missing some shared library for python3.6.


I am sure for regular ubuntu users this is a trivial thing to fix. I am not that person. I already ruined one ubuntu installation by removing and reinstalling python3. So reinstalled everything, and going for take 2


The error message when I try to run the gdb client:


bp@bp-legion:~/Downloads/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin$ ./arm-none-eabi-gdb --version

./arm-none-eabi-gdb: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

I have this shared library on my disk here:


/snap/gnome-3-28-1804/161/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0

I tried to symlink that library to /usr/lib, but then it complains about


bp@bp-legion:~/Downloads/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin$ sudo ln -s -f /snap/gnome-3-28-1804/161/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0 /usr/lib/libpython3.6m.so.1.0
[sudo] password for bp:
bp@bp-legion:~/Downloads/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin$ ./arm-none-eabi-gdb --version
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f2017abfc00 (most recent call first):
Aborted (core dumped)

At this point I reinstalled python3 last time, resulting in wrecking my ubuntu installation.


Is there anybody that can tell me how to get latest (11.20) arm toolchain working on ubuntu 22.04?


More From » python

 Answers
0

  1. Download and extract source code of python 3.6.15 from python website



  2. Prepare necessary dependencies


    sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev libgdbm-dev libnss3-dev libedit-dev libc6-dev



  3. From extracted folder do:


    sudo ./configure --enable-optimizations -with-lto --enable-shared

    sudo make sharedinstall

    sudo ln -s /usr/local/lib/libpython3.6m.so.1.0 /usr/lib/x86_64-linux-gnu




[#489] Friday, September 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fatuatexen

Total Points: 451
Total Questions: 107
Total Answers: 110

Location: Trinidad and Tobago
Member since Thu, Apr 27, 2023
1 Year ago
fatuatexen questions
;