Skip to main content
Diego1
Associate II
April 26, 2023
Question

How can I install STM32CubeIde on Linux Debian 12?

  • April 26, 2023
  • 8 replies
  • 13228 views

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

8 replies

AScha.3
Super User
April 26, 2023

I think you can install old python 2 also.... just search for it.

"If you feel a post has answered your question, please click ""Accept as Solution""."
EP.4
Associate
April 27, 2023

I had the same complaint. Remove python2.7 first. Then do `sudo apt-get install libpython2.7-stdlib:amd64=2.7.18-8 libpython2.7-minimal`

Diego1
Diego1Author
Associate II
April 27, 2023

But on Debian12 it is not present at all python2.7 is not supported by the operating system, and it is not present in the repositories. So I can't remove it or install it, unfortunately...

Pavel A.
Super User
April 27, 2023

Why do you have to install CubeIDE on this? Can you get a supported Linux version? The price is same.

Raees
Associate II
April 28, 2023

Same issue in Ubuntu 23 also

Visitor II
August 6, 2023

I ran into a similar problem on Ubuntu 23.04.  I don't have python 2.7 and don't really want to install it as this version is long dead.  
There are two installers, avoid the debian one and try the generic linux one:

owennewo_0-1691347173684.png

After unpacking/installing - I ran the `./stm32cubeide_wayland` option.  Not sure if this debian 12 is on wayland by default now but it works for my Ubuntu 23.04 install

Heinrich
Associate III
December 2, 2023

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

Many thanks!

Visitor II
June 20, 2024

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
August 30, 2024

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)

 

Visitor II
October 24, 2024

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.