{"id":23,"date":"2009-08-04T23:19:44","date_gmt":"2009-08-04T22:19:44","guid":{"rendered":"http:\/\/paguilar.org\/?p=23"},"modified":"2009-08-04T23:19:44","modified_gmt":"2009-08-04T22:19:44","slug":"installing-stlinux23-in-ubuntu-904","status":"publish","type":"post","link":"https:\/\/paguilar.org\/?p=23","title":{"rendered":"Installing STLinux2.3 in Ubuntu 9.04"},"content":{"rendered":"<p>The installation of STLinux in a Debian-based distribution doesn&#8217;t seem to be straight-forward because STLinux uses RPM as package manager whereas Ubuntu uses Debian&#8217;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.<\/p>\n<p>For installing SLinux2.3 you&#8217;ll have to install the RPM package manager.<br \/>\nDPKG is already installed in your host and you&#8217;ll use it for installing the RPM package manager.<\/p>\n<p>Install the RPM package manager and the python-rpm package because the installation procedure uses Python.<\/p>\n<pre lang=\"bash\">$ apt-get install rpm python-rpm<\/pre>\n<p>Populate the RPM database since it&#8217;s empty using the package <a href=\"http:\/\/www.stlinux.com\/drupal\/sites\/default\/files\/stlinux23-host-STLinux_deps-0.1-4.i386.rpm\">stlinux23-host-STLinux_deps-0.1-4.i386.rpm<\/a><\/p>\n<pre lang=\"bash\">$ rpm -ivh stlinux23-host-STLinux_deps-0.1-4.i386.rpm<\/pre>\n<p>The STLinux installation procedure uses Python 2.5, but Ubuntu 9.04 uses Python2.6 that introduces the new reserved keyword &#8216;with&#8217;. Unfortunately, the install script uses &#8216;with&#8217; as variable, not as reserved keyword, so it gives the following error when executing it:<\/p>\n<pre lang=\"python\">  File \"\/opt\/STM\/STLinux-2.3\/host\/usr\/lib\/python2.3\/site-packages\/yum\/__init__.py\", line 399 \n    self.repos.populateSack(with='filelists')\n                               ^   \nSyntaxError: invalid syntax<\/pre>\n<p>In order to avoid this problem, you can temporary set the symbolic link <em>\/usr\/bin\/python<\/em> to <em>\/usr\/bin\/python2.5<\/em>:<\/p>\n<pre lang=\"bash\">$ cd \/usr\/bin\n$ mv \/usr\/bin\/python \/usr\/bin\/python_orig\n$ ln -s python2.5 python<\/pre>\n<p><strong>Older Ubuntu versions<\/strong>: Older versions of Ubuntu that use python2.5 won&#8217;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. <\/p>\n<p>Now everything is ready for installing STLinux2.3.<br \/>\nAssuming 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: <\/p>\n<pre lang=\"bash\">$ .\/install all-sh4-glibc\nor\n$ .\/install all-sh4_uclibc<\/pre>\n<p>After installation you probably want to upgrade to the latest packages available from ST. You can run <em>stmyum update<\/em> several times until it responds that there are no more packages marked for upgrade.<\/p>\n<pre lang=\"bash\">$ \/opt\/STM\/STLinux-2.3\/host\/bin\/stmyum update<\/pre>\n<p>At this point you can set the \/usr\/bin\/python symbolic link to it&#8217;s original value<\/p>\n<pre lang=\"bash\">$ cd \/usr\/bin\n$ rm \/usr\/bin\/python\n$ mv python_old python<\/pre>\n<p>As a final and optional step, you can add the cross-toolchain to your path and add it to your .bashrc script:<\/p>\n<pre lang=\"bash\">$ export PATH=$PATH:\/opt\/STM\/STLinux-2.3\/devkit\/sh4\/bin<\/pre>\n<p>References:<br \/>\n<a href=\"http:\/\/stlinux.com\/drupal\/install\">Installation and Getting Started<\/a><br \/>\n<a href=\"http:\/\/www.stlinux.com\/drupal\/faq?q=node\/361\">Installing STLinux on Ubuntu<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The installation of STLinux in a Debian-based distribution doesn&#8217;t seem to be straight-forward because STLinux uses RPM as package manager whereas Ubuntu uses Debian&#8217;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&#8217;ll have to\u2026 <span class=\"read-more\"><a href=\"https:\/\/paguilar.org\/?p=23\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,16],"tags":[25,60,40],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-compiling","category-stlinux","tag-installation","tag-stlinux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":0,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}