What is the preferred way to install STM32CubeIDE on Linux?

 The “normal” / preferred way is to use ST’s own Linux installer script for your distro, not random third-party packages.



On Linux ST actually offers three bundles, all installed the same way: 

  • ...rpm_bundle.sh → for Fedora / RHEL / CentOS / openSUSE (RPM-based)

  • ...deb_bundle.sh → for Ubuntu / Debian (Deb-based)

  • plain .shgeneric Linux (good fallback if the distro is too new and the deb/rpm bundle complains about deps)


1. Recommended installation (any distro, using ST installer)

  1. Go to the official STM32CubeIDE page and download the Linux installer for your architecture. 

  2. Open a terminal in the download folder.

  3. Make the installer executable (optional but nice):

    chmod +x st-stm32cubeide_*_amd64*.sh
  4. Run it with root privileges:

    sudo sh ./st-stm32cubeide_*_amd64*.sh
    • Replace the * with whatever version string you downloaded, e.g.
      st-stm32cubeide_1.16.0_36100_20240131_1500_amd64.sh

  5. Follow the text-mode wizard (license, install path, components).

  6. After it finishes, you can usually launch it from your desktop menu or with:

    /opt/st/stm32cubeide_*/stm32cubeide &

This is exactly what ST describes in UM2563 “STM32CubeIDE installation guide” for Linux. 


2. If you’re on Ubuntu/Debian

You have two options:

A) Use the Debian bundle (*_deb_bundle.sh)

This script unpacks several .deb files and installs them with apt for you. The steps are the same as above:

chmod +x st-stm32cubeide_*_amd64.deb_bundle.sh sudo sh ./st-stm32cubeide_*_amd64.deb_bundle.sh

Internally it runs something equivalent to: 

sudo apt-get install ./segger-jlink-udev-rules-xxxx-linux-all.deb \ ./st-stlink-udev-rules-xxxx-linux-all.deb \ ./st-stlink-server-xxxx-linux-amd64.deb \ ./st-stm32cubeide_xxxx_amd64.deb

B) If the deb bundle complains about old libraries (Debian 12 / Ubuntu 23+)

On newer Debian/Ubuntu, people hit issues with Python 2.7 / old libs when using the deb bundle. ST’s own forum and users often recommend switching to the generic .sh installer instead, which avoids those package-level dependency problems. 

So if the deb_bundle refuses to install cleanly, just download the generic Linux .sh variant and install it as in section 1.


3. Alternative: Flatpak (nice if you want sandboxing / easy updates)

If you don’t care about “official ST only”, there is a Flatpak on Flathub:

# one-time Flatpak setup (if you don’t have it yet) sudo apt install flatpak # Debian/Ubuntu flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo # install STM32CubeIDE flatpak install flathub com.st.STM32CubeIDE # run it flatpak run com.st.STM32CubeIDE

This works on almost any distro and isolates STM32CubeIDE in a sandbox, which many Linux devs like. 


TL;DR

  • Preferred / official:
    Download from ST → run sudo sh ./st-stm32cubeide_<version>_<arch>.<deb_bundle.sh | rpm_bundle.sh | sh>

  • On very new Debian/Ubuntu:
    If the deb bundle whines about dependencies, switch to the generic .sh installer.

  • If you want distro-agnostic packaging:
    Use the Flathub Flatpak (com.st.STM32CubeIDE).

评论

此博客中的热门博文

Detailed Explanation of STM32 HAL Library Clock System

How To Connect Stm32 To PC?

How do you set up ADC (Analog-to-Digital Converter) in STM32?