Octave for Debian systems: Difference between revisions

move PPA section as subsection of pre compiled binaries
(Not everyone will understand what a PPA is. I did not when I started with Octave in Linux.)
(move PPA section as subsection of pre compiled binaries)
Line 2: Line 2:


== Pre-compiled binaries ==
== Pre-compiled binaries ==
=== Distribution repositories ===


Binary packages for Octave and many Octave-Forge packages are provided by all versions of Debian and Ubuntu. These are the most well-tested binaries available and should work best for most users.
Binary packages for Octave and many Octave-Forge packages are provided by all versions of Debian and Ubuntu. These are the most well-tested binaries available and should work best for most users.


Octave is often split over multiple packages to cover the different parts of it. Aside the {{codeline|octave}} package that installs GNU Octave, there is also {{codeline|octave-doc}}, {{codeline|octave-info}}, and {{codeline|octave-htmldoc}} for the documentation, {{codeline|liboctave-dev}} for the octave development library (required to install most packages), and {{codeline|octave-dbg}} for the debugging symbols.
sudo apt-get install octave
 
=== Troubleshooting ===
 
When installing Octave 3.2 in Ubuntu, broken packages install may cause an <span color="red">error: `pkg' undefined</span> error, previously reported as [https://bugs.launchpad.net/ubuntu/+source/octave3.2/+bug/465005 bug 465005]:
 
...
Setting up octave3.2 (3.2.2-2build1) ...
error: `pkg' undefined near line 0 column 1
dpkg: error processing octave3.2 (--configure):
  subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for menu ...
Errors were encountered while processing:
  octave3.2
E: Sub-process /usr/bin/dpkg returned an error code (1)


Fix this by complete reinstall:
Aside the {{codeline|octave}} package that installs GNU Octave, other pieces of it are split over multiple packages. These are {{codeline|octave-doc}}, {{codeline|octave-info}}, and {{codeline|octave-htmldoc}} for the documentation, {{codeline|liboctave-dev}} for the octave development library and required to install some Octave Forge packages, and {{codeline|octave-dbg}} for the debugging symbols.


sudo apt-get --purge remove octave3.2
sudo apt-get --purge remove octave3.2-common
sudo apt-get install octave3.2


== Octave's Personal Package Archive (PPA) ==
=== Octave's Personal Package Archive (PPA) ===


However, for some Ubuntu releases the octave packages are old.  The [https://launchpad.net/~octave GNU Octave Team] on Launchpad maintain a PPA providing a binary packages of the latest stable and unstable versions of Octave for all versions of Ubuntu. To set up your system to install these packages
However, for some Ubuntu releases the octave packages are old (Debian Squeeze and Ubuntu 12.04 or older only have Octave version 3.2).  The [https://launchpad.net/~octave GNU Octave Team] on Launchpad maintain a PPA providing a binary packages of the latest stable and unstable versions of Octave for all versions of Ubuntu. To set up your system to install these packages


  sudo apt-add-repository ppa:octave/stable
  sudo apt-add-repository ppa:octave/stable
  sudo apt-add-repository ppa:octave/unstable
  sudo apt-add-repository ppa:octave/unstable # optional
  sudo apt-get update
  sudo apt-get update
  sudo apt-get install octave
  sudo apt-get install octave