Problem compiling programs in STM32CubeIDE

so i downloaded the STM32 Cube IDE , everything worked fine while i was compiling c programs for my own machine (x86) but yesterday i tried to compile a program and upload it to my stm32 nucleo board i downloaded a firmware update(not sure if related) , i got these errors:
"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
"

when running the command arm-none-eabi-gdb --version in konsole i get this output:

"arm-none-eabi-gdb --version
Exception caught while booting Guile.
Error in function ā€œmake_objcode_from_fileā€:
bad header on object file: ā€œ\x7fELF \x02 \x01 \x01Ćæ \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00ā€
arm-none-eabi-gdb: warning: Could not complete Guile gdb module initialization from:
/usr/share/gdb/guile/gdb/boot.scm.
Limited Guile support is available.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (GDB) 10.1
Copyright Ā© 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
"

also i do have the library i checked it like so:
ls /lib/ | grep libtinfo
libtinfo.so
libtinfo.so.5
libtinfo.so.6

i tried downloading using pacman -S and pamac GUI here are the packages i have downloaded:
"

arm - none - eabi-binutils 2.35.1-1
arm - none - eabi-gcc 10.2.0.1
arm - none - eabi-gdb 10.1-1
arm - none - eabi-newlib 3.3.0-1
"

all of them from pamac GUI

i tried searching online and the only related article i found with an answer was on arch linux forums but im not allowed to post links , basically they referred the guy to a github repo where they had edited the PKG file.
but they seem to be advanced users , did not understand what the solution was :smiley:

so could you guys please help me out? and im a new user so please explain in details otherwise i wonā€™t understand :smiley:
thank you

I found the lib in:

$ pamac search --files libncurses.so.5
/usr/lib32/libncurses.so.5 is owned by lib32-ncurses5-compat-libs
/usr/lib/libncurses.so.5 is owned by ncurses5-compat-libs

ncurses5-compat-libs and lib32-ncurses5-compat-libs probably need to be installedā€¦

1 Like

@megavolt
Iā€™m having the same problem where I get the error
arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

but when I run that pamac command I get this

pamac search --files libncurses.so.5 ī‚² 127 āœ˜
No package owns libncurses.so.5

any thoughts?

@DDAA05880621 Looks like the package: ncurses5-compat-libs has been dropped from the official repo, ncurses is the default (v6.3).

If you really need this, then compile the packages yourself:

pamac build ncurses5-compat-libs

Or if ncurses v6 is also backwards compatible with ncurses v5 applications, try this:

LD_PRELOAD=/usr/lib/libncurses.so exec_command

This will force to load the default lib first and therefore overwrite the linked v5.

@megavolt
AWESOME
Thank you that got it.