Skip to main content
flxzt
Associate
September 13, 2022
Question

STM32CubeIDE requires libncurses.so.5, which is not provided on Fedora 37 anymore.

  • September 13, 2022
  • 11 replies
  • 18917 views

I recently updated my Fedora installation to the 37 beta. Because the package `ncurses-compat-libs` which provided the ncurses5 library was removed, I am unable to install STM32CubeIDE.

A fix would be to update the dependency to version 6, which is provided by Fedora 37 by `ncurses-libs`.

11 replies

flxzt
flxztAuthor
Associate
September 23, 2022

are there any plans to move to ncurses-6?

raptorhal2
Lead
September 23, 2022

In Ubuntu this works:

sudo add-apt-repository universe

sudo apt-get install libncurses5

flxzt
flxztAuthor
Associate
September 24, 2022

unfortunately ncurses-5 is not in the repositories in fedora 37 anymore.

flxzt
flxztAuthor
Associate
September 24, 2022

I managed to get it to install by compiling ncurses from source with the `--with-abi-version=5` parameter. Here is a small, rudimentary script for anyone facing the same issue:

#!/bin/bash
 
wget "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.3.tar.gz"
tar -xvf ncurses-6.3.tar.gz
cd ncurses-6.3
 
# args taken from `https://src.fedoraproject.org/rpms/ncurses/blob/f36/f/STAGE2-ncurses`
./configure --prefix=/usr/local \
 --with-shared --without-ada --with-ospeed=unsigned \
 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo \
 --enable-hard-tabs --enable-xmc-glitch --enable-colorfgbg \
 --enable-overwrite \
 --enable-pc-files \
 --disable-wattr-macros \
 --with-termlib=tinfo \
 --with-chtype=long \
 --with-ticlib \
 --with-abi-version=5 # ABI version 5 produces `libncurses.so.5`
 
make
sudo make install

After running this, `/usr/local/lib` must be added to the library path if it isn't already and then STM32CubeIDE can be installed with the generic linux installer.

(It still would be nice if future versions upgrade to ncurses-6 to avoid having to do this)

Pavel A.
Super User
September 25, 2022

Why CubeIDE needs libncurses at all? It is a GUI program.

Martin Davey
Associate III
March 9, 2023

I think it's just arm-none-eabi-gdb that sometimes needs it.. for when the --tui option is used.

Associate
January 7, 2024

I had the same problem with Ubuntu 23.10 when I tried installing STM32CubeIDE with en.st-stm32cubeide_1.13.2_18220_20230914_1601_amd64.deb_bundle.sh.zip, but it installed successfully with the Generic Linux version, en.st-stm32cubeide_1.14.0_19471_20231121_1200_amd64.sh.zip. My OS uses ncurses6 and STM32CubeIDE is running fine under Ubuntu.

However, the STM32CubeIDE installation is broken! I.e., while I didn't get any errors installing it, I just got one from the debugger! I was able to Build my project, but when I plugged the board with ST-Link and ran the debugger, I got this error:

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

So, GDB was expecting libncurses.so.5 but I only have libncurses.so.6! So, it's back to trying to install ncurses5.

Sorry for jumping the gun on this.

CKugl.1
Senior
February 11, 2024

My STM32CubeIDE installation was running OK on Ubuntu 23 but then it broke; I think it was when I installed the separate STM32Cube Programmer. I found libncurses.so.5 in /snap/core18/2812/lib/x86_64-linux-gnu so I did

sudo vi /etc/ld.so.conf and added the line

 

/snap/core18/2812/lib/x86_64-linux-gnu

 

 and then sudo ldconfig. That fixed it for me.

Explorer
February 27, 2024

Thanks! This work for me"

Senior
January 8, 2024

For Fedora, try this library as a replacement : ncurses-compat-libs.

For Ubuntu, have a look at this, it is for Debian but should also work.

Associate
January 8, 2024

I got my STM32CubeIDE to work under Ubuntu 23.10 by building gcc-arm-none-eabi-10.3-2021.10 and replacing the original STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.linux64_1.1.100.202309141235/tools/bin/arm-none-eabi-gdb with the new one. The build took several hours of machine time on an  i7-5820K with 16 GB RAM. I was too lazy to trim it down to just build the arm-none-eabi-gdb since the configuration was too daunting for me.

Pavel A.
Super User
January 8, 2024

Ah so it is gdb. I thought it is the cube programmer CLI. Then removing this dependency isn't trivial - but still not a rocket science.

AMurz.1
Associate II
January 20, 2024

Hi,

I got the same issue with Debian Sid, libncurses5 does not exists anymore.

Please update gdb build with up to date dependencies. libncurses6 exists in ubuntu since 20.04 (4 years ago).

Associate III
March 26, 2024

On Ubuntu 23.04 I encountered the same problem, and `libncurses5` cannot be installed anymore.

New Solution:

`sudo apt install gdb-multiarch`

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

pkoevesdi_0-1711469167502.png

Then "Set Default" on this new entry.

 

 

Visitor II
July 11, 2024

I'm trying to install STM32CubeIDE 1.16 using the rpm installer in almalinux 9.5, but it won't allow it, as it misses libncurses.so.5 on the rpm checks.

 

I've installed ncurses-compat-lib from epel9 and it includes /usr/lib64/libncurses.so.5, also the package ncurses-compat-lib provides lists give:

  • libform.so.5()(64bit)
  • libformw.so.5()(64bit)
  • libmenu.so.5()(64bit)
  • libmenuw.so.5()(64bit)
  • libncurses++.so.5()(64bit)
  • libncurses++w.so.5()(64bit)
  • libncurses.so.5()(64bit)
  • libncursesw.so.5()(64bit)
  • libpanel.so.5()(64bit)
  • libpanelw.so.5()(64bit)
  • libtic.so.5()(64bit)
  • libtinfo.so.5()(64bit)
  • ncurses-compat-libs = 6.2-8.20210508.1.el9
  • ncurses-compat-libs(x86-64) = 6.2-8.20210508.1.el9

It provides libncurses but for 64 bits. I found a package packaged for rocky linux with the same version number for i686

https://koji.rockylinux.org/koji/buildinfo?buildID=36131

i installed it and the stm package finally allowed installation. This means, either st is still dependening on old i686 libraries or that the definition of dependencies of their packages is wrongly pointing to the i686 package.