Octave 3.6.4 on Ubuntu 12.04

Here’s how to install GNU Octave 3.6.4 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
4) sudo apt-get install liboctave-dev

Note: if you have Octave 3.2 installed already, these commands will uninstall Octave 3.2 and install Octave 3.6 on Ubuntu 12.04.

To install packages, start Octave in sudo mode i.e. type in Terminal:
sudo octave
and then you can install packages by typing in Octave:
pkg -verbose install -forge specfun
to install the specfun package, and so on.
DON’T FORGET to exit Octave after done installing packages (so that you’re not left running Octave in sudo privileges).

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.


Wojciech Jung posted on December 10, 2012 at 13:19

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

Jackson Beatty posted on February 4, 2013 at 15:08

Thanks very much. Your instructions did the job for me.
Best regards,

Hans Pottstock-Vidal posted on February 16, 2013 at 20:02

Thank you very very much! everything worked smoothly.

patrick costello posted on February 17, 2013 at 09:39

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):

Brad Zoltick posted on March 10, 2013 at 16:26


Thank you. It works.


Devashish posted on March 22, 2013 at 15:39

Thank you very much. Everything seems to work beautifully.
(I have Ubuntu 12.04.02 LTS 64 bit)

Sam Bennett posted on April 10, 2013 at 15:30

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

Misge posted on April 16, 2013 at 03:56

Thank you very much.

Jurek posted on April 28, 2013 at 05:41

Thanks. Everything is OK.

Edward Paul posted on May 1, 2013 at 06:14

Thank you for the terminal commands.
Everything worked fine.



somenath jalal posted on June 6, 2013 at 05:13

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?

Deshna posted on June 17, 2013 at 01:41

Worked perfectly on my machine ..

Hakuri posted on July 5, 2013 at 15:02

IS IT POSSIBLE To ADD QTOCTAVE in Ubuntu 12.04 using octave 3.6.4?

Joachim posted on August 19, 2013 at 06:49

Workd for me. The difficulty is now how to install forge packages.

Mika posted on September 17, 2013 at 12:15

Works like a charm. Thanks for posting.

Pete posted on October 14, 2013 at 09:50

How do I get the OpenGL graphics backend?

Bernard posted on October 14, 2013 at 11:38

Worked perfectly. Thank you.

Francis posted on October 14, 2013 at 12:20

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. .

Tuomas posted on December 16, 2013 at 09:04

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?

Peter Müller posted on December 28, 2013 at 20:19

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.

kabir singh christy posted on March 29, 2014 at 02:32

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

krishna posted on April 18, 2014 at 02:15


Thanks, You have made my day,
Working Fine,

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


Michael Hirsch posted on April 18, 2014 at 13:09

Krishna, consider Octave 3.8, which comes with a GUI.

Félix Beaudoin posted on June 28, 2014 at 13:46

Merci !

3 Trackbacks

[…] codes and that it is not installed in my usr/bin directory. I just installed Octave via the link: http://blogs.bu.edu/mhirsch/2012/08/…-ubuntu-12-04/ Now, my airfoil.stl file has been successfully created with the directory it was saved in. […]

[…] 14.04 has Octave 3.8 by default – yay! If this all is too hard, consider just using the Octave 3.6 PPA or upgrading to Ubuntu […]

[…] found this quick fix for the problem. It involves four steps on a […]

Post a Comment

Your email address is never shared.