Skip to main content
DQuir.1
Associate II
Solved

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

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

 

mattias norlander
ST Technical Moderator

The error message suggests that your Ubuntu system is lacking libncurses. Try:

sudo apt-get install libncurses5

If that does not help. Let us know which Ubuntu version...

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.

49 replies

mattias norlander
ST Technical Moderator

The error message suggests that your Ubuntu system is lacking libncurses. Try:

sudo apt-get install libncurses5

If that does not help. Let us know which Ubuntu version...

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
JBara.1
Visitor II

I had the same problem and it was very useful, thank you so much @mattias norlander​ 

Javier_Leyva08
Associate

it has resolved my issue too.!! thank you @mattias norlander​ :D

FAres.1
Visitor II

I'm facing the same problem, and now, in the Linux distro I use, there's only libncurses.so.6.

What can I do?

mattias norlander
ST Technical Moderator

Hi,

The toolchain was built depending on libncurses5. The 5 --> 6 step implies that they are not binary compatible. Hence you have to rely on libncurses5.

Wich distro are you using?

You should be able to install them side-by-side. But in some distros the package name including libncurses5 may be different...

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
FAres.1
Visitor II

Thanks for your reply. I'm using the Gentoo distro, and it doesn't supply libncurses 5 anymore. Fiddling a bit, I've noticed that, after solving libncurses issue, there will be some more libraries with newer versions to handle. For now, I'll be using an Ubuntu 18 virtual machine, but that's​ quite awful.

mp035
Associate II

For anyone using Manjaro or Arch linux, installing this package from the AUR solves the problem:

http://aur.archlinux.org/packages/tnt-ncurses5-compat-libs

Note that the default ncurses5-compat-libs package is too new, the one above will force its removal.

Associate II

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/ncurses/libtinfo6_6.2-0ubuntu2.1_amd64.deb Temporary failure resolving 'in.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

 

 

Gabriel_Csefalvay
Associate

I have the same problem.

Issue: The libncurses5 library was deprecated in previous Ubuntu versions and was removed from the recent version. ST should have dealt with this issue right when the library version became deprecated and not let it come to this point.

Workaround:

sudo add-apt-repository deb http://security.ubuntu.com/ubuntu lunar-security main universe
sudo apt-get update
sudo apt-get install libncurses5

 

 

Explorer

Ok. I got an other workaround :D

Just downgrade your Ubuntu... I downgraded to 20.04 and after that it was working just fine.

I will try out your solution when I run in the same problem again. Thanks!

Associate III

On Ubuntu 23.10 I encountered the same problem, but `libncurses5` cannot be installed anymore.

New Solution:

`sudo apt install gdb-multiarch`

And then, like shown some posts ago, go to "Window" -> "Preferences" -> "STM32Cube" -> "Toolchain Manager" -> "Add Local" and set it up like this:

pkoevesdi_0-1711469167502.png

Then "Set Default" on this new entry.

 

 

Associate III

My solution doesn't survive a program restart. Any idea, why and how to fix? And it doesn't build anymore.

Associate III

So, I made a quick, ugly workaround:

 

sudo -i
apt install gdb-multiarch # as mentioned before
cd /opt/st/stm32cubeide_1.15.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.0.100.202403111256/tools/bin # or wherever you installation is
mv arm-none-eabi-gdb arm-none-eabi-gdb.bak
ln -s /usr/bin/gdb arm-none-eabi-gdb

 

With this, building AND debugging works again on Ubuntu 23.10.

Explorer

Thank you, still working on Ubuntu 24.04

DAldr.1
Associate

ST has a real problem here as evidenced by the number of respondents.  What needs to happen ASAP is a rebuild using libncurses.so.6.  Looking across the net, it appears that 6 alleviates some long existing security issues.  Version 5 is not even on option in my Mint/Ubuntu 22 Kernel 6.8 distribution.  I finally resulted begrudgingly, to drop back to windows.

 

Good Luck All.