cancel
Showing results for 
Search instead for 
Did you mean: 

How can I install STM32CubeIde on Linux Debian 12?

Diego1
Associate II

I start the installation of STM32CubeIde on Debian 12, but it is impossible to continue the installation because it needs libpython2.7 and I have python3 installed on system. I can't downgrade the system.

How can I do?

Thank you

13 REPLIES 13
Heinrich
Associate III

This way worked for me too, I'm using debian SID (trixie).

Many thanks!

badia
Associate II

I tryed the same thing on 20.6.2024. But it is still the same. I run into a dependency hell!!!!!!!!!!!!!

Would someone from STM take care of this. Just install stmcupeide on a new setup Debian!!!

M_3
Associate II

For ci, I managed to install python2.7 following https://www.fadedbee.com/2024/01/18/installing-python2-on-debian-12-bookworm/ .

After that I needed to add a tool from testing (to get a recent version), which broke the setup.sh script because of this line in it:

 

if [ $distro = "debian" -a $distro_version = "8" ] ; then

 

 

While the reason obvious, running shellcheck will help reveal other potential issues (and some false positives) to the maintainers of the install script.  My workaround was to write appropriate version information to /etc/os-release so that $distro_version is not empty which was breaking the test expression - probably because I am using "testing".

After adding  `mime-support shared-mime-info libgtk-3-0` to the packages I installed before starting the setup.sh script, it all works out again.

To build on debian from the cli, I use something like this:

 

bash -c "pwd ; $${STM32CUBEIDE} --launcher.suppressErrors -nosplash -application org
.eclipse.cdt.managedbuilder.core.headlessbuild -data '/workspace' -import . -cleanBuild PROJECT/Release"

 

 

As I use PREBUILD and POSTBUILD steps and the integrated GNU Make, I made those settings compatible with both Windows and LInux (which is copied as is in the generated makefile):

 

$(if $(findstring mingw,$(subst MINGW,mingw,$(MAKE_HOST))),..\PREBUILD.BAT,../PREBUILD.sh)

 

AlexMelbourne
Associate

You can extract the packages from the shell script with the option --target <dirname>

Then you can use dpkg -i to install most of the packages and fix the dependencies the main package needs to forced the installation as it thinks it needs python 2.7.

sudo ./st-stm32cubeide_1.16.1_22882_20240916_0822_amd64.deb_bundle.sh --target ./stmPackages

sudo dpkg --force-depends -i st-stm32cubeide-1.16.1-22882-20240916-0822_amd64.deb

It seems to work, I would not be surprised it it completely works as python is mostly backward comptable maybe some python packages will be broken.