cancel
Showing results for 
Search instead for 
Did you mean: 

How to update STM32CubeIDE on Linux?

Miles1
Associate III

If I open "Help > Check for Updates", I encounter an "Insufficient access privileges to apply this update" error.

0693W000002lil8QAA.png

I installed by following this guide:

https://www.st.com/resource/en/user_manual/dm00603964-stm32cubeide-installation-guide-stmicroelectronics.pdf

And running the following command:

sudo sh st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.deb_bundle.sh

I'm then able to launch the IDE from the OS GUI, just like any other app.

To update, do I need to launch STM32CubeIDE as root from CLI and then navigate to the update dialog?

sudo /opt/st/stm32cubeide_1.4.0/stm32cubeide

Or will that mess things up more?

If there are special update instructions for Linux, the guide should include those. A workaround is to re-download and re-install the IDE, but doing that for every update is not ideal. And in this case, there's no way to download 1.4.2. The latest available is still 1.4.0. https://www.st.com/en/development-tools/stm32cubeide.html

1 ACCEPTED SOLUTION

Accepted Solutions
Julien D
ST Employee

Hello Mf.1,

Unfortunately this is expected.

Since you've installed STM32CubeIDE using the Debian package, hence as root, you must have to run the application as root to unblock updates. Thing which is usually not advised in Linux world. Only installation of third-party features is supported by this kind of installation.

I'd suggest you to install it using the generic installer script st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.sh. With this, the installation location will be owned by your uid, and updates will be possible.

View solution in original post

8 REPLIES 8
Julien D
ST Employee

Hello Mf.1,

Unfortunately this is expected.

Since you've installed STM32CubeIDE using the Debian package, hence as root, you must have to run the application as root to unblock updates. Thing which is usually not advised in Linux world. Only installation of third-party features is supported by this kind of installation.

I'd suggest you to install it using the generic installer script st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.sh. With this, the installation location will be owned by your uid, and updates will be possible.

A note about being able to install the generic version as non-root would be great to include in the installation guide (linked above).

The guide currently claims that all installation methods require root.

"The installation is done through a product installer. Linux® root privileges are required to complete the installation."

"Enter the following command in the console window:"

sudo sh ./st-stm32cubeide_VERSION_ARCHITECHURE.PACKAGE

Installation guide is probably the is lacking some convenience feature, but fact is admin rights are required to install components used by Debug features.

From what I can say, if I launch the script without sudo, even if I get the following message the installation path is owned by my uid.

Do you want to install STLinkServer and Udev rules for STLink and Jlink? Without these packages, you will not be able to use debugging feature.
Install them? (you need sudo permission to do that) [Y/n]

This question is expected since STLinkServer and udev rules for STLink and Jlink needs to be placed in /usr/bin and /etc/udev/rules.d.

There is one workaround, but little bit hackish.

Start install as normal (without root) but in the moment that script is asking about legal stuff open another terminal and from folder that was created by installation script copy all deb files:

$ ls -l
total 749766
-rwxrwxrwx 1 root root     17522 Oct  6 20:46 segger-jlink-udev-rules-6.80b-linux-all.deb
-rwxrwxrwx 1 root root     35048 Oct  6 20:46 st-stlink-server-1.3.0-4-linux-amd64.deb
-rwxrwxrwx 1 root root      4842 Oct  6 20:46 st-stlink-udev-rules-1.0.2-3-linux-all.deb
-rwxrwxrwx 1 root root 767701298 Oct  6 20:46 st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.deb
 

Force to instal stm32ide without root in your home dir like this:

$ dpkg -x ./st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.deb dir

and the rest like usual with root:

sudo apt-get install ./st-stlink-udev-rules-1.0.2-3-linux-all.deb

Then you can move folder with stm32ide as you wish as all paths are relative.

After start you can update to 1.4.2

What you describe PHryn is exactly the use-case supported by the Generic Installer script (st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.sh) executed as normal user.

With this

  • the installation location is not locked to /opt, and owned by the user (enabling self-update capability)
  • other dependencies packages, such as udev rules, are still installed as root (sudo)

Furthermore this is less hackish as 100% supported :)

PHryn
Associate III

Doing things hard way is the story of my life...

I should read what you wrote in your answer more carefully.

Regards,

JMeij.1
Associate

Facing the same issue here. Again very disappointed that ST's official installation doesn't work as it should.

The workaround I followed was to change the /opt/st directory's owner to my user.

```

cd /opt

chown -R $USER:$USER st

```

Excellent, that worked for me updating a version not since 8 months ago. After restart it crashed Restart it again, it worked. It .did not go back the to original workspace. Also had to recreate the C/C++ perspective