Sunday, December 9, 2012

Installing Scilab 5.4.0 on Linux Mint 13 (or Ubuntu)

Linux Mint/Ubuntu still has the old scilab in their repository.  Not only that, but it forces installation of openjdk, while I want to use the Oracle jdk:


wskellenger@marquette ~ $ sudo apt-get -V install scilab
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
   antlr (2.7.7+dfsg-3)
   ca-certificates-java (20110912ubuntu6)
   default-jre (1.6-43ubuntu2)
   default-jre-headless (1.6-43ubuntu2)
   fop (1.0.dfsg2-6)
   icedtea-6-jre-cacao (6b24-1.11.5-0ubuntu1~12.04.1)
   icedtea-6-jre-jamvm (6b24-1.11.5-0ubuntu1~12.04.1)
   icedtea-netx (1.2-2ubuntu1.3)
   javahelp2 (2.0.05.ds1-6)
   libatk-wrapper-java (0.30.4-0ubuntu2)
   libatk-wrapper-java-jni (0.30.4-0ubuntu2)
   libbatik-java (1.7.ubuntu-8ubuntu1)
   libfop-java (1.0.dfsg2-6)
   libjeuclid-core-java (3.1.9-2ubuntu1)
   libjgraphx-java (1.4.1.0-3)
   libjhdf5-java (2.6.1-2build1)
   libjlatexmath-fop-java (0.9.7-1)
   libjogl-java (1.1.1+dak1-11)
   openjdk-6-jre (6b24-1.11.5-0ubuntu1~12.04.1)
   openjdk-6-jre-headless (6b24-1.11.5-0ubuntu1~12.04.1)
   openjdk-6-jre-lib (6b24-1.11.5-0ubuntu1~12.04.1)

   rhino (1.7R3-5)
   scilab-cli (5.3.3-6)
   scilab-data (5.3.3-6)
   scilab-doc (5.3.3-6)
   scilab-full-bin (5.3.3-6)
   scilab-include (5.3.3-6)
   scilab-minimal-bin (5.3.3-6)
   scilab-sivp (0.5.3-3)

Suggested packages:
   fop-doc (1.0.dfsg2-6)
   javahelp2-doc (2.0.05.ds1-6)
   libjlatexmath-java-doc (0.9.7-1)
   libjogl-java-doc (1.1.1+dak1-11)
   icedtea-plugin (1.2-2ubuntu1.3)
   sun-java6-fonts ()
   fonts-ipafont-gothic (00303-5)
   fonts-ipafont-mincho (00303-5)
   ttf-telugu-fonts (0.5.11ubuntu1)
   ttf-oriya-fonts (0.5.11ubuntu1)
   ttf-kannada-fonts (0.5.11ubuntu1)
   ttf-bengali-fonts (0.5.11ubuntu1)
   librhino-java-doc (1.7R3-5)
   scilab-doc-fr (5.3.3-6)
   scilab-doc-pt-br (5.3.3-6)
   scilab-doc-ja (5.3.3-6)
   gfortran (4.6.3-1ubuntu5)
   scilab-swt (0.1.0rc4-5)
   scilab-scimax (2.1.4-1)
   scilab-plotlib (0.42-1)
   scilab-ann (0.4.2.4-1)
The following NEW packages will be installed:
   antlr (2.7.7+dfsg-3)
   ca-certificates-java (20110912ubuntu6)
   default-jre (1.6-43ubuntu2)
   default-jre-headless (1.6-43ubuntu2)
   fop (1.0.dfsg2-6)
   icedtea-6-jre-cacao (6b24-1.11.5-0ubuntu1~12.04.1)
   icedtea-6-jre-jamvm (6b24-1.11.5-0ubuntu1~12.04.1)
   icedtea-netx (1.2-2ubuntu1.3)
   javahelp2 (2.0.05.ds1-6)
   libatk-wrapper-java (0.30.4-0ubuntu2)
   libatk-wrapper-java-jni (0.30.4-0ubuntu2)
   libbatik-java (1.7.ubuntu-8ubuntu1)
   libfop-java (1.0.dfsg2-6)
   libjeuclid-core-java (3.1.9-2ubuntu1)
   libjgraphx-java (1.4.1.0-3)
   libjhdf5-java (2.6.1-2build1)
   libjlatexmath-fop-java (0.9.7-1)
   libjogl-java (1.1.1+dak1-11)
   openjdk-6-jre (6b24-1.11.5-0ubuntu1~12.04.1)
   openjdk-6-jre-headless (6b24-1.11.5-0ubuntu1~12.04.1)
   openjdk-6-jre-lib (6b24-1.11.5-0ubuntu1~12.04.1)

   rhino (1.7R3-5)
   scilab (5.3.3-6)
   scilab-cli (5.3.3-6)
   scilab-data (5.3.3-6)
   scilab-doc (5.3.3-6)
   scilab-full-bin (5.3.3-6)
   scilab-include (5.3.3-6)
   scilab-minimal-bin (5.3.3-6)
   scilab-sivp (0.5.3-3)

0 upgraded, 30 newly installed, 0 to remove and 19 not upgraded.
Need to get 73.7 kB/88.5 MB of archives.
After this operation, 254 MB of additional disk space will be used.
Do you want to continue [Y/n]?


To get the latest and greatest I just downloaded the scilab 5.4.0 binary from the Scilab website.  Extract the archive somewhere.  Everything should be neatly placed in a folder like "scilab-5.4.0".  I moved the entire folder to /usr/local/bin.  As root:

wskellenger@marquette / $cd /usr/local/bin
marquette bin # mv /home/wskellenger/Downloads/scilab-5.4.0 .

Now tell the system you've installed it:

marquette bin # update-alternatives --install "/usr/bin/scilab" "scilab" "/usr/local/bin/scilab-5.4.0/bin/scilab" 1
update-alternatives: using /usr/local/bin/scilab-5.4.0/bin/scilab to provide /usr/bin/scilab (scilab) in auto mode.


marquette bin # update-alternatives --install "/usr/bin/scilab-cli" "scilab-cli" "/usr/local/bin/scilab-5.4.0/bin/scilab-cli" 1
update-alternatives: using /usr/local/bin/scilab-5.4.0/bin/scilab-cli to provide /usr/bin/scilab-cli (scilab-cli) in auto mode.


Set scilab and scilab-cli as defaults:

marquette bin # update-alternatives --set scilab /usr/local/bin/scilab-5.4.0/bin/scilab
marquette bin # update-alternatives --set scilab-cli /usr/local/bin/scilab-5.4.0/bin/scilab-cli


Now exit root and try to run it as your usual user:

wskellenger@marquette ~ $ scilab

(process:11270): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.

Probably I should fix that locale warning, but it isn't critical.  You should see scilab 5.4.0.

No comments:

Post a Comment