Installing STLinux2.3 in Ubuntu 9.04

By | August 4, 2009

The installation of STLinux in a Debian-based distribution doesn’t seem to be straight-forward because STLinux uses RPM as package manager whereas Ubuntu uses Debian’s DPKG. These package managers are completely different and incompatible, but you can have both installed on the same host and therefore STLinux installed on Ubuntu.

For installing SLinux2.3 you’ll have to install the RPM package manager.
DPKG is already installed in your host and you’ll use it for installing the RPM package manager.

Install the RPM package manager and the python-rpm package because the installation procedure uses Python.

Populate the RPM database since it’s empty using the package stlinux23-host-STLinux_deps-0.1-4.i386.rpm

The STLinux installation procedure uses Python 2.5, but Ubuntu 9.04 uses Python2.6 that introduces the new reserved keyword ‘with’. Unfortunately, the install script uses ‘with’ as variable, not as reserved keyword, so it gives the following error when executing it:

In order to avoid this problem, you can temporary set the symbolic link /usr/bin/python to /usr/bin/python2.5:

Older Ubuntu versions: Older versions of Ubuntu that use python2.5 won’t have this problem, but could have a problem with bash that is required by the installation procedure, too. If this is the case, you can install it and create a symbolic link in an analog way.

Now everything is ready for installing STLinux2.3.
Assuming that you already downloaded and mounted an ISO image of STLinux, change to the directory where the image is mounted and run the install script:

After installation you probably want to upgrade to the latest packages available from ST. You can run stmyum update several times until it responds that there are no more packages marked for upgrade.

At this point you can set the /usr/bin/python symbolic link to it’s original value

As a final and optional step, you can add the cross-toolchain to your path and add it to your .bashrc script:

Installation and Getting Started
Installing STLinux on Ubuntu

18 thoughts on “Installing STLinux2.3 in Ubuntu 9.04

  1. paguilar

    I tested that procedure in a 32 bit T7100 Intel Core2 Duo.
    I don’t think it will work with a 64 bit processor.
    Eg. The cross-toolchain was generated by ST for a 32 bit processor.


  2. kikiri

    ubuntu9.04 on STLinux ok.

    enigma2 error:

    buffer.cpp: In member function ‘int eIOBuffer::peek(void*, int) const’:
    buffer.cpp:64: error: ‘memcpy’ was not declared in this scope
    buffer.cpp: In member function ‘void eIOBuffer::write(const void*, int)’:
    buffer.cpp:110: error: ‘memcpy’ was not declared in this scope
    make[2]: *** [buffer.o] Error 1
    make[2]: Leaving directory /usr/local/src/enigma2/lib/base'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory
    make: *** [all-recursive] Error 1

  3. Luca72

    I get this error on kubuntu 9.10:
    rpm -ivh stlinux23-host-STLinux_deps-0.1-4.i386.rpm
    rpm: please use alien to install rpm packages on Debian, if you are really sure use –force-debian switch. See README.Debian for more details.

  4. paguilar

    ‘alien’ allows you install rpms in .deb-based machines because it convert the rpm to deb. You need to install it first and then keep going with the rpm as if you were in an .rpm-based machine.

  5. domino


    Have installed the stlinux23-host-STLinux_deps-0.1-4.i386.rpm. on my Debian Lenny 32 bits machine.

    Still get the problem: “Error: Missing Dependency: is needed by package stlinux23-host-mtd-utils”.

    Any ideas?


  6. paguilar

    This would mean that you need to install stlinux23-host-mtd-utils before stlinux23-host-STLinux_deps-0.1-4.i386.rpm. However, I’ve had this problem before, are you using the install script or are you doing it manually?

    Btw, sorry for the late reply, I’ve been quite busy lately, but hopefully I’ll write more posts during the following weeks.

  7. Chrisgg

    I’m trying to setup a QBoxHD compiling environment on a PC running Ubuntu. I followed all your steps, but I get this:

    “soluna@ubuntu:/mnt/st$ sudo ./install all-sh4_uclibc

    * Looks like you are trying to install on a Ubuntu system *
    * *
    * This is not officially supported, but can be made to work *
    * *
    * Look at the following links and carry out the steps listed there *
    * and then rerun this script with the –debian flag *
    * * *
    * *
    soluna@ubuntu:/mnt/st$ sudo ./install all-sh4_uclibc –debian
    * Installing STLINUX 2.4

    Trying to find out if you are inside STMicroelectronics
    Please wait for up to 10 seconds…..
    ping: unknown host
    You are not inside ST, using

    * There is a distribution available in the local directory *
    * This will be used for install. You can issue an *
    * stmyum update command to update your system later on *

    Looking for a GPG key file
    Found a GPG key file in local directory
    rpmkeys: –force-debian: unknown option
    Failed to import GPG key into RPM , giving up”

    I followed all the steps here as well, but it made no difference:
    The iso I downloaded is STLinux 2.4 and I have Ubuntu 11.10 32 bit.

    1. paguilar

      The QBoxHD was developed with STLinux2.3, but I don’t think that using STLinux2.4 would be a problem since the only thing that it’s used from STLinux is the toolchain. The problem you have regards the install script inside STLinux2.4. I think you can solve it if you comment int he install script the code that checks if the signing keys are installed (lines [07-312) and manually you execute:

      and then run install again.
      I hope this helps.

  8. fodil


    I tested every thing to install stlinux on virtual box of Oracle and I did’nt succeed….!
    Local ant net install with the old install scrpt and the new one on Fedora11 and Fedora 16, Opensuse, Ubuntu 9.04 and 11.04 and many other things…..for almost 2 weeks!

    Please can you make us a virtual box image of any distribution with stlinux ready to use on it!!!!!

    Many thanks.

    1. paguilar

      I’ve been quite busy lately, so I cannot guarantee that I can do it fast, but I’ll try to have some time for it.

  9. fodil


    Thank you very much for your reply,

    For two times, I tried to install stlinux by network on fedora11 during all the night and in the morning…I have this:
    (656/659): stlinux23-sh4-ypbind-1.20.4-10.sh4.rpm | 52 kB 00:01
    (657/659): stlinux23-sh4-zlib-1.2.3-8.sh4.rpm | 72 kB 00:01
    (658/659): stlinux23-sh4-zlib-bin-1.2.3-8.sh4.rpm | 96 kB 00:02
    (659/659): stlinux23-sh4-zlib-dev-1.2.3-8.sh4.rpm | 92 kB 00:03

    Error Downloading Packages:
    stlinux23-host-u-boot-source-sh4-1.3.1_stm23_0057-57.noarch: failure: host/stlinux23-host-u-boot-source-sh4-1.3.1_stm23_0057-57.noarch.rpm from STLinux_Distribution_Updates: (256, ‘No more mirrors to try.’)
    stlinux23-host-stworkbench- failure: stworkbench/stlinux23-host-stworkbench- from STLinux_Distribution_Updates: (256, ‘No more mirrors to try.’)

    error: package stlinux23-install-all-sh4-glibc is not installed

    I’m not happy at all!


  10. fodil


    by the way, Is there a way to change the install script to do only the install not the downloading….because I have almost all the packages downloaded in tmp directory!


  11. fodil


    How to install in stlinux openssl and libusb ?

    Because I have this issue during the compile sh4:

    — Looking for openssl/aes.h
    — Looking for openssl/aes.h – found
    — openssl not found.
    — Looking for time.h
    — Looking for time.h – found
    — librt found (needed by libusb).
    — liboscam_stapi.a found
    — Looking for libusb-1.0/libusb.h
    — Looking for libusb-1.0/libusb.h – not found
    — no libusb 1.0 found. No smartreader support
    — Looking for PCSC/wintypes.h
    — Looking for PCSC/wintypes.h – not found
    — The CXX compiler identification is GNU



Leave a Reply

Your email address will not be published. Required fields are marked *