Octave 3.8 on Ubuntu 12.04

Here’s how to install GNU Octave 3.8 on Ubuntu 12.04 (also on Ubuntu 10.04):

Open Terminal and do:
1) sudo apt-add-repository ppa:octave/stable
2) sudo apt-get update
3) sudo apt-get install octave liboctave-dev

Note: if you have Octave 3.2 installed already, these commands will uninstall Octave 3.2 and install Octave 3.8.

To install packages, start Octave in sudo mode i.e. type in Terminal:
and then you can install packages by typing in Octave:
pkg -verbose install -forge specfun
to install the specfun package, and so on.

To use the Octave packages you must type pkg load image to load the “image” package and so on.

You can list the loaded packages by typing in octave pkg list. The loaded packages have an asterisk next to their name.

27 thoughts on “Octave 3.8 on Ubuntu 12.04”

  1. After this command sudo apt-add-repository ppa:picaso/octave
    I have a response:
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File “/usr/lib/python2.7/threading.py”, line 551, in __bootstrap_inner
    File “/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py”, line 99, in run
    File “/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py”, line 132, in add_ppa_signing_key
    tmp_keyring_dir = tempfile.mkdtemp()
    File “/usr/lib/python2.7/tempfile.py”, line 322, in mkdtemp
    name = names.next()
    File “/usr/lib/python2.7/tempfile.py”, line 141, in next
    letters = [choose(c) for dummy in “123456”]
    File “/usr/lib/python2.7/random.py”, line 274, in choice
    return seq[int(self.random() * len(seq))] # raises IndexError if seq is empty
    ValueError: cannot convert float NaN to integer

  2. Fantastic, thanks!

    Note to others: make sure to install both the “octave” and the “liboctave-dev” packages, otherwise I got.

    error: feval: function `unimplemented’ not found

    dpkg: error processing octave (–configure):

  3. Hi, I have problems with segmentations faults when running griddatan, I have an amd64 core. Do you have any suggestions for fixing that? Cheers, Sam

  4. Hi, I have ubuntu 12.04 LTS 64 bit installed in lenovo thinkpad E430
    I foolwed the same rule but this is the problem:

    somenath@thinkpad~$sudo apt-get install octave
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    octave : Depends: libarpack2 (>= 2.1) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

    Can you help?

  5. Thank you very much. Your instructions worked perfectly.
    However, I can only start Octave by typing “octave” at the shell prompt. Clicking on the the Octave Icon, does work. .

  6. Hi managed to install octave just fine but got big problems when trying to install statistics package..first complains that statistics need io=>1.0.18 and when trying to install io-1.2.5 get following error:
    octave:2> pkg -verbose install -forge io-1.2.5
    error: get_forge_pkg: package not found: “io-1.2.5″. Maybe you meant “audio?”
    error: called from:
    error: /usr/share/octave/3.6.4/m/pkg/private/get_forge_pkg.m at line 74, column 9
    error: /usr/share/octave/3.6.4/m/pkg/pkg.m at line 2420, column 15
    error: /usr/share/octave/3.6.4/m/pkg/pkg.m at line 374, column 32

    Can you help?

  7. from the article: “To use the Octave packages you must type pkg load image to load the “image” package and so on.” it is easier to add the option -auto to pkg install, this way octave will load the packages automatically after restarting.

  8. Thanks. It works very nice. Can you please suggest the way to install the octave.info for 3.6.4 version?

  9. Hi,

    Thanks, You have made my day,
    Working Fine,

    Q. Is there any GUI based version available for it?


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>