cancel
Showing results for 
Search instead for 
Did you mean: 

I'm working with ubuntu and it gives me the following error doing debug

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

26 REPLIES 26

You can add local toolchain in Windows->preferences-> toolchain manager

0693W00000JOjkXQAT.png,but it`s hard. For Arch i just use: https://aur.archlinux.org/packages/ncurses5-compat-libs

 I believe you will find a way for yourself by combining this knowledge.

I just encountered the same problem. CubeIDE was unable to determine the version of arm-none-eabi-gdb. I went ahead and installed ncurses5-compat-libs from the aur and now i get the following error when debugging/launching code in CubeIDE:

Could not determine GDB version using command: arm-none-eabi-gdb --version
arm-none-eabi-gdb: /usr/lib/libncurses.so.5: version `NCURSES_5.3.20021019' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /usr/lib/libncurses.so.5: version `NCURSES_5.1.20000708' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /usr/lib/libncurses.so.5: version `NCURSES_5.6.20061217' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /usr/lib/libncurses.so.5: version `NCURSES_5.0.19991023' not found (required by arm-none-eabi-gdb)

mp035
Associate III

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.

Girish1
Associate III

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?

 

 

Same problem here, could you fix the problem somehow?

Gabriel_Csefalvay
Associate II

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

 

 

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!

pkoevesdi
Senior

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.

 

 

pkoevesdi
Senior

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

pkoevesdi
Senior

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.