I want to install Octave on my Ubuntu LTS with apt-get. The problem is that the official repositories list only Octave 3.0 and Octave 3.2, whereas the latest Octave is Octave 3.6.

How do I update the repositories of apt-get to get Octave 3.6?


This PPA should solve your problem, provided you are running the latest 12.04.

Open Terminal Ctrl-Alt-T and type:

sudo apt-add-repository -y ppa:picaso/octave
sudo apt-get update 
sudo apt-get install octave
sudo apt-get install liboctave-dev 
| improve this answer | |
  • even after update the repositories are not showing octave 3.6. I am searching in both synaptic and apt-get – prometheuspk May 18 '12 at 9:47
  • What version of Ubuntu are you running? – ish May 18 '12 at 9:48
  • Ubuntu 10.04 LTS – prometheuspk May 18 '12 at 9:49
  • Repos in both answers are for 12.04 LTS only :(. Can you upgrade? – ish May 18 '12 at 9:52
  • 2
    PPAs must usually be restricted to specific versions because they contain binaries which have been compiled on that specific version, for that specific version. – ish May 18 '12 at 9:59

The answer is quite simple. Go to the Octave downloads website and find the latest release of GNU Octave and download the .tar.gz file of it.

After this copy and paste the following terminal (CTRL+ALT+T) commands:

sudo apt-get build-dep octave
cd ~/Downloads
sudo mv octave-x.x.x.tar.gz ~
cd ~
tar xvf octave-x.x.x.tar.gz
cd octave-x.x.x
sudo make install

Where the 'x.x.x' refers to the version of GNU Octave you'd like to install, such as 3.6.3.

| improve this answer | |

Just as an update: this PPA (maintained by a member of the Debian Octave Group) provides the latest Octave for a range of Ubuntu versions.

| improve this answer | |

I am only "answering" this because I could not format in the comments. kudos to @izx and @Brenton Horne

For, I had to use a bit of both answers:

sudo apt-add-repository -y ppa:picaso/octave
sudo apt-get update
sudo apt-get install octave
sudo apt-get install liboctave-dev

These made octave 4.0 run, but not with --force-gui

sudo apt-get build-dep octave

was also required to get --force-gui to work.

| improve this answer | |

This does not use apt-get, but an alternative mechanism, flatpak, which has its own elaborate installation instructions, depending on Linux distribution and desktop environment used.

You can run the newest version of Octave (5.1.0 since March 2019) by running it as a Flatpak app. "Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux."

The installation procedure for the Octave package is described here: https://flathub.org/apps/details/org.octave.Octave (2 commands at bottom of page)

If you are on Ubuntu 16.04, You have to install flatpak first, then run Octave:

sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt install flatpak
sudo apt install gnome-software-plugin-flatpak  # optional, AFAIK
flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave --gui

This downloads about 1.5 GB from the internet, because it installs KDE dependencies as well.

On my machine, it installs this:

       ID                                            Branch        Download
 1. [|] org.kde.Sdk                                  5.12          < 825,1 MB
 2. [ ] org.freedesktop.Platform.html5-codecs         8.08         < 4,9 MB
 3. [ ] org.kde.Sdk.Locale                            5.12         < 337,3 MB (partial)
 4. [ ] org.octave.Octave                             stable       < 117,0 MB

Note that Octave 5.1.0 itself is only 117 MB.

To upgrade, I had to uninstall the octave flatpak, then run flatpak install.

| improve this answer | |

Latest ppa is ppa:octave/stable.


This ppa is maitained by the "GNU Octave" team and has version 3.8.1 available for lucid and precise.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.