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

 

48 REPLIES 48

Hi, now doesn't work, what to do?

Reading packet lists ... Ready
Building a tree of addictions ... ready
Reading information about the state ... ready         
Libncurses5 package is not available, but mentioned in the list of dependencies of another
Package. This may mean that the package is absent, outdated or
Available from sources not mentioned in Sources.list

E: For the Libncurses5 package, a candidate for installation was not found

And when I write the code for the controller (F411re), an error is issued:

Could not determine GDB version using command: arm-none-eabi-gdb --version
arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

Hi,

maybe:

You have to install STM32CubeIDE Generic Linux Installer, and not the STM32CubeIDE Debian Linux Installer.

Or...

i installed gdb-multiarch and set symlinks, see:

https://community.st.com/t5/stm32cubeide-mcus/on-ubuntu-debug-says-quot-could-not-determine-gdb-version-quot/m-p/796903#

...just search here in forum, what solutions work on different Linux variants.

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

I am using linux mint and this method worked for me than you very much sir.

raffone
Associate

I've had the same issue, but when I run the command "sudo apt-get install libncurses5" I get the error message "Unable to locate package libncurses5". The debug ran correctly once, then promted for an update. After I updated it and tried to run it again I got this error message. I am using the USB connection CN15 labelled ST-LINK on a NUCLEO-WB55RG evaluation board. My version of Ubuntu is 24.04

libncurses5 was removed in Ubuntu 24.04. Try

curl -O http://launchpadlibrarian.net/648013227/libncurses5_6.4-2_amd64.deb

sudo dpkg -i libncurses5_6.4-2_amd64.deb

Thank you worked perfectly.

This was to fix Ubuntu 24.04 OS where libncurses.so.5 for GDB is not available.

Worked !!

rahgirrafi
Associate II

I was using Arch Linux. I had install the following package:

yay -S ncurses5-compat-libs
CubeSatLover67
Associate

I am on Ubuntu 25.04, and I solved this problem by first installing gdb-multiarch.

sudo apt-get install gdb-multiarch

I had to do this because the arm-none-eabi-gdb binary included with the latest version of CubeIDE relies on libncurses.so.5, which Ubuntu 25.04 no longer supports. To solve this, you have to replace said binary with a symlink to gdb-multiarch. "Multiarch" stands for "multiple architectures", so it includes the arm-none-eabi stuff. This can be accomplished in a few commands:

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

The directory in the first command can be found by opening the IDE, and clicking Window -> Preferences -> STM32 Cube -> Toolchain Manager. I restarted the IDE and debugging started working.