How to install the latest version of Octave in Linux Mint

In a previous discussion, it was lamented that the latest version of Linux Mint provides a version of Octave that was released over a year and a half ago, and Octave has had three stable releases since then.

The easiest and best supported methods to install the current version of Octave on Linux Mint (and other similar “stable” distributions) are as a Flatpak or Snap application. Refer to the Flathub listing and the Flatpak notes on the Octave wiki for more details about installing Octave with Flatpak. Refer to the Snap Store listing and the Snap notes on the Octave wiki for more details about installing Octave with Snap.

It’s worth noting that the Linux Mint maintainers have chosen to discourage using Snap on Linux Mint by default. It can still be used without any problems, but it requires a little extra system configuration. That’s documented in the Mint-specific installation notes on the Snap Store.

Edited and expanded for clarity as a standalone post after being moved from the previous discussion.

Tks. I’ll check.

@mtmiller snap is purposely not installed in mint (can be but not recommended.)

flatpak is (that’s how I run Octeve)

@jarkky To install Octave, ‘flatpak install org.octave.Octave’

I’ve got a bash script ‘OCTAVE’ so I can open a .m file from nemo:

# open ocatave in its .m file's directory
# usage: OCTAVE [path]/file.m
cd $(dirname $1)
flatpak run org.octave.Octave --gui --persist  $1  &


Edit: I don’t know this markup!!! :slight_smile:

snap is purposely not installed in mint (can be but not recommended.)

I see, that’s a relatively new change, I wrongly assumed Mint was
still largely an Ubuntu clone. Thanks for the correction.

It looks like flatpak then actually is the one to use.

Do you want to install it? [Y/n]: Y

org.octave.Octave permissions:
    ipc                   network              pulseaudio      wayland      x11      dri
    file access [1]       dbus access [2]

    [1] host, xdg-config/kdeglobals:ro
    [2] com.canonical.AppMenu.Registrar, org.freedesktop.Flatpak

        ID                                                     Branch           Op           Remote           Download
 1. [✓] org.freedesktop.Platform.GL.default                    20.08            i            flathub            105.8 MB / 106.4 MB
 2. [✓] org.freedesktop.Platform.GL.nvidia-470-63-01           1.4              i            flathub            223.3 MB / 223.4 MB
 3. [|] org.freedesktop.Platform.VAAPI.Intel                   20.08            i            flathub           < 11.6 MB
 4. [ ] org.freedesktop.Platform.openh264                      2.0              i            flathub            < 1.5 MB
 5. [ ] org.kde.Sdk.Locale                                     5.15             i            flathub          < 345.8 MB (partial)
 6. [ ] org.kde.Sdk                                            5.15             i            flathub          < 774.8 MB
 7. [ ] org.octave.Octave                                      stable           i            flathub          < 139.5 MB

Installing 3/7…

But it looks like a lot of stuff more is needed than for typical installation case of octave.
The compatibility for octave 6.3.0 is possibly not solved with typical LinuxMint packages.
Or is possibly impossible to solve with standard LinuxMint20.2 packages.
Linux mint itself ‘says’:

jari@cosmo:/usr/bin$ octave

Command 'octave' not found, but can be installed with:

sudo snap install octave  # version 6.3.0, or
sudo apt  install octave  # version 5.2.0-1

See 'snap info octave' for additional versions.

And after using flatpak the shell can not find the octave binary to run…
If I’m right the binary is in this strange directory:

jari@cosmo:/var/lib/flatpak/app/org.octave.Octave/x86_64/stable/445155c2768aecc9cd6a179bc453383f588969f83a4a6f80c7b5555dcd7b76df/files/bin$ source ./octave-6.3.0 
bash: source: ./octave-6.3.0: cannot execute binary file

It seems to work now if I add this link:
lrwxrwxrwx 1 root root 46 Sep 22 13:27 /usr/bin/octave -> /var/lib/flatpak/exports/bin/org.octave.Octave
Not sure if correct.
Some module looks failing to get found, but it might not be an issue:

jari@cosmo:~$ octave
Gtk-Message: 13:33:48.737: Failed to load module "xapp-gtk3-module"
Qt: Session management error: None of the authentication protocols specified are supported

And soon after installation it is found that the command as below:

octave:2> system("cd ~/bin; pingconv pingstat.txt");
sh: line 1: pingconv: command not found

Does not operate with new octave (6.3.0) version at all.
This all worked well with older 5.2.0 -version.
It looks some minor adjustment to get it work with 6.3.0 such as:
octave:3> system("cd ~/bin; ./pingconv pingstat.txt");
I could not see why this is needed (to add the “./” in front of the command’s name).
Earlier octave and in normal shell it works without this “./”.
Maybe there is a lot of ‘adjustments’ to the operation that is needed, even though
it might cause issues to existing programs operation and behavior.
I wonder what it requires if the parenthesis “()” in function call are changed to square brackets “[]”?
For example:
atan(x) -> atan[x]
The latter though looks much harder to type on my keyboard.

Flatpak Octave is not ‘installed’ as such.
It’s run using

flatpak run org.octave.Octave --gui --persist

See my earlier post


I don’t know what it is doing. It seems to work now.

Sorry. I missed the

system("cd ~/bin; pingconv pingstat.txt"); 


Flatpak runs octave in a “virtual machine” (just found this out myself) and has its own copies of /bin, /usr/bin, etc.

You’ll need to run


and other system() stuff in a different process , like a shell.

Edit: Boy I wish there was a preview button!!!

This will happen with LinuxMint20.2:

Gtk-Message: 22:36:19.473: Failed to load module "xapp-gtk3-module"
Qt: Session management error: None of the authentication protocols specified are supported

But it seems nothing critical though.

below command seems not operating in this flatpak version:

octave:2> [s,msg]=system("pidof xclock")
s = 1
msg =

shell case it responds as:

 jari@cosmo:~$ pidof xclock

I think I need the ‘spawn’ option but can not find it…
Not 100% sure how to fix this.
It is maybe safer now, but can not do some of the commands.

I modified the given startup script and placed this to the /usr/bin…

# Start octave

flatpak run org.octave.Octave --gui --persist $1 $2 &

Script can have the ‘-qf’, etc arguments:
#!/usr/bin/octave -qf
not sure how many of the $1, $2, etc is needed.

Use $* instead of $1 $2 that will give you all the arguments.

That is what I was looking for…

You can just install the flatpak version of GNU Octave from the Linux Mint Software Manager, no Terminal required.

Linux Mint 20.2 Cinnamon