Skip to main content
DQuir.1
Associate II
February 25, 2020
Solved

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

  • February 25, 2020
  • 19 replies
  • 40404 views

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

 

Best answer by mattias norlander

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...

19 replies

mattias norlander
ST Employee
February 26, 2020

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...

JBara.1
Visitor II
April 18, 2020

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

Javier_Leyva08
Associate
July 11, 2020

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

FAres.1
Visitor II
November 7, 2021

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 Employee
November 8, 2021

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...

FAres.1
Visitor II
November 8, 2021

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
July 7, 2022

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
December 13, 2023

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
March 21, 2024

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
March 21, 2024

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
March 26, 2024

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
March 26, 2024

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

Associate III
March 26, 2024

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
May 7, 2024

Thank you, still working on Ubuntu 24.04

DAldr.1
Associate
October 4, 2024

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.