cancel
Showing results for 
Search instead for 
Did you mean: 

On ubuntu; debug says "Could not determine GDB version"

DQuir.1
Associate II

Could not determine GDB version using command: /opt/st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb --version

/opt/st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

 

39 REPLIES 39
mladen
Associate II

This solution also doesn't work for me.I'm having same behavior as Richard.

My question would be what linux distribution is proven to work for STM32 tools?

Hi,

i have latest MxLinux , MX 23.5 Libretto;

STM32CubeIDE 1.18.0  : installed 1.18. amd64_deb_bundle  , working all fine - except : no debug, because still needs this 20 y old libs, libncurses.so5  or so, but after install gdb-multiarch (and making symlink) now fine.

And (until now) never crash or suddenly cannot open ioc /Cube file and hang up then, what happened with (my last) version 1.13.

AScha3_1-1742939061724.png

 

 

Some days ago needed CubeProgrammer, download en.stm32cubeprg-lin-v2-19-0, unzip, start install - ok. working.

AScha3_0-1742938883674.png

Here seems from install to running it all ok, no problems at all.

 

If you feel a post has answered your question, please click "Accept as Solution".
ntsafas
Associate

OS: 24.04.2 LTS (Noble Numbat)

STM32CubeIDE Version: 1.18.0


Steps:
1. arm-none-eabi-... installation:
- Download the Latest Release

x86_64 Linux hosted cross toolchains

AArch32 bare-metal target (arm-none-eabi)

arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz

https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

- Extract the Archive

tar -xf arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz

- Move It to /opt

sudo mv arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi /opt/arm-toolchain

- Add It to Your PATH

echo 'export PATH=/opt/arm-toolchain/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

 


2. libncurses5 installation - Solution from here:
https://askubuntu.com/questions/1531398/how-to-install-libncurses-so-5-for-ubuntu-24-04


https://stackoverflow.com/a/39840595
Add to source list and then install:

  • deb http://security.ubuntu.com/ubuntu focal-security main universe

    echo "deb http://security.ubuntu.com/ubuntu focal-security main universe" > /etc/apt/sources.list.d/ubuntu-focal-sources.list
  • sudo apt-get update

  • sudo apt-get install libncurses5

 

3. Nothing else done in preferences

Racim15
Associate

My configuration : Ubuntu 24.10 /  STM32CubeIDE : 1.18.0.

After installing all the necessary packages for gdb and libncurses.so.6 (since libncurses.so.5 is not available with this version of Ubuntu), the workaround I found is to create a symbolic link for arm-none-eabi-gdb pointing to my local gdb: /usr/bin/arm-none-eabi-gdb.

 

you can follow this steps :

remove or just change the name of arm-none-eabi-gdb

sudo mv /opt/st/stm32cubeide_1.18.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/arm-none-eabi-gdb /opt/st/stm32cubeide_1.18.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/arm-none-eabi-gdb.org

 

create the Symbolic Link

sudo ln -s /usr/bin/arm-none-eabi-gdb /opt/st/stm32cubeide_1.18.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/arm-none-eabi-gdb

 


Zhe_WANG
Associate

For people using ubuntu 24.04, I am on ubuntu 24.04 x64. And I met same problem, following steps works for me.
step 1:
  wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
step 2:
  wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.3-2ubuntu0.1_amd64.deb
step3:
  sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb libncurses5_6.3-2ubuntu0.1_amd64.deb
step4:
  ls -l /lib/x86_64-linux-gnu/libncurses.so.5
You should see the output be like:
lrwxrwxrwx 1 root root 17 May 17 2023 /lib/x86_64-linux-gnu/libncurses.so.5 -> libncurses.so.5.9

Please tell us step by step for this process

 

after this what can i do?

 

Hi, the problem should be solved, you can try debug with your chip.

mladen
Associate II

Hi !

I have solve the problem in another way.And it wasn't working before. You can see my previous post, that I had problems also. I was frustrated and complettely removed STM32CubeIDE but I after saw post from Zhe-WANG, decided to try again.
Then I remembered that I have read about below descibed trick with pausing somewhere, but before I was only install package with jlink rules, but didn't relized that I have libncurses5 and libtinfo5 there. :)

I'm using latest Linux Mint Linux Mint 22.1 Cinnamon which is based on Ububtu 24.04. 

Download latest CubeIde script installation file.  Mine was stm32cubeide_1.18.0_24413_20250227_1633_amd64.deb_bundle.sh

Start installation in command line bt sudo sh ./stm32cubeide_1.18.0_24413_20250227_1633_amd64.deb_bundle.sh

During the installation of STM32Cube, when prompted for installing JLink rules, STOP and go to your installation folder.
There would be new folder (locked by installation) which contain all installation files including 
libncurses5_6.4-2_amd64.deb
libtinfo5_6.4-2_amd64.deb, which are version 5 what we need.
and segger-jlink-udev-rules-8.12c_final-linux-all.deb
For some reason installation script is not installing them.
You need to get into that folder by getting it as root, and to save all files somewhere else. Very important since installation will remove it.
Since you have this files saved, continue installation as normal.

When all is finished, install this deb files mentioned above with dpgk -i command.

When I installed this, STM32CubeIDE is not complaing about "Can't find GDB" and debugging is working.

mladen_0-1744418787797.png


Hope this help.

saved my day!

Thanks.

(Linux Mint 22.1 / st-stm32cubeide_1.18.1_24813_20250409_2138_amd64.deb_bundle)