7

On this old question How to install Octave 4.0.0 in Ubuntu 14.04 they say to use this:

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

But when I run this command on Ubuntu 18.04:

$ sudo add-apt-repository ppa:octave/stable
[sudo] password for linux:         
HTTP Error 404: Not Found
Cannot add PPA: ''This PPA does not support bionic''.
user
  • 475
  • Please limit your questions to Ubuntu and its official flavors. Mint is not an official flavor and is not supported here. – DK Bose Apr 20 '19 at 01:43

2 Answers2

8

The latest updated release from PPA is Xenial (16.04), this explain why you get Cannot add PPA: ''This PPA does not support bionic''. error.

GNU has distributed Octave as Flatpak package, and they do offer version 5—precisely 5.1.0 → https://flathub.org/apps/details/org.octave.Octave

Install flatpak, then add flathub repository.

sudo apt-get install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

You can proceed to install Octave now.

flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave
Liso
  • 15,377
  • 3
  • 51
  • 80
  • 2
    Thanks, but it seems to download the whole ecosystem, GUI etc. Is there a good way to install only the core, with script processor and a couple of required packages? – ansgri Nov 20 '19 at 10:00
1

Use Ubuntu Software Center(or the Snap store), the latest version is available, officially from GNU Octave.

sudo snap install octave

Here's a link if you need specs https://snapcraft.io/octave

Also, don't use apt, as it contains a 4.x version, and the GUI is ancient.

@Liso I'd prefer avoiding flatpak as it takes a huge amount of space, even for trivial stuff.