How to Install GNU Octave 9.2.0 in Ubuntu 24.04 | 22.04

Last updated: October 17, 2024 — Leave a comment

This tutorial shows you how to install the latest GNU Octave (version 9.2.0 so far) in all current Ubuntu releases, including Ubuntu 20.04, Ubuntu 22.04, and Ubuntu 24.04.

GNU Octave is a free open-source scientific programming language, primarily intended for numerical computations. It features powerful mathematics-oriented syntax with built-in 2D/3D plotting and visualization tools, cross-platform, and drop-in compatible with many Matlab scripts.

The latest version of the programming language has reached version 9.2.0. Features in the 9.x release series include:

  • Overhauled dec2base, dec2bin, and dec2hex. They now accept negative inputs and fractional inputs.
  • Re-architected the inputParser function to get a 60% performance improvement.
  • The perms function has been made faster.
  • New functions, including isenv, ismembertol, isuniform, tensorprod.
  • Removed disable_diagonal_matrix, disable_permutation_matrix, and disable_range functions. Replacements are optimize_diagonal_matrix, optimize_permutation_matrix, and optimize_range
  • Operators, such as .+, .+=, **, and .**= are removed. Replacements are +, +=, +=, ^, and .^=.
  • And, following function are obsolete: idx_vector::bool(), all_ok(const Array&) in Array-util.h, octave_base_value::count
  • Support Qt6.
  • Deprecate FLTK backend, in favor of Qt.

See the news page for more about Octave 9.

Install Octave 9.2.0 in Ubuntu Linux

Octave 9.2.0 has been made into Ubuntu 24.10 system repository. But for current 3 Ubuntu LTS releases, the package in system repositories is old!

Besides building from the source tarball, user can choose to either install Flatpak package or use Ubuntu PPA. Both are however unofficial.

Option 1: Install Octave 9.2.0 via Flatpak

Flatpak is an universal Linux package format that runs in sandbox environments. The Octave as Flatpak package so far supports both amd64 (Intel/AMD) and arm64 (RasPi, Apple Silicon) platforms.

Linux Mint 21/22 with unverified Flatpaks enabled, and Fedora 38+ with 3rd party repository enabled can search & install the package from either Software Manager or GNOME Software.

For Ubuntu & Debian, first open up a terminal window (Ctrl+Alt+T), then run commands:

  • Enable Flatpak package support by running command:
    sudo apt install flatpak

  • Then, add the Flathub repository which hosts the software package:
    flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

    For other Linux, see the official setup guide to enable Flatpak support.

  • Finally, run command to install the Octave Flatpak package:
    flatpak install flathub org.octave.Octave

After installation, either search for & launch it from start menu or Gnome overview (log out and back in if app icon not visible), or use the command below to start it from terminal:

flatpak run org.octave.Octave

To check updates for the package, use command:

flatpak update org.octave.Octave

Option 2: Install GNU Octave via Ubuntu PPA

The software used to have an official PPA but discontinued. For the most recent releases, I’ve made the native .deb packages into this unofficial PPA with Ubuntu 20.04, Ubuntu 22.04, and Ubuntu 24.04 on amd64 and arm64/armhf platforms support.

NOTE: The PPA package is backported from Debian upstream but without well testing! Please let me know if it’s outdated.

1. To add the PPA, open terminal (Ctrl+Alt+T) and run command:

sudo add-apt-repository ppa:ubuntuhandbook1/octave

Type user password (no visual feedback) when it asks and hit Enter to continue.

2. Then, either use “Software Updater” to update Octave package if an old .deb package was installed.

Or, use the command below to install the package:

sudo apt install octave

NOTE: Some Ubuntu based systems, e.g., Linux Mint, need to run command sudo apt update to manually refresh cache after adding PPA.

After installed the package, search for and launch from start menu (or GNOME overview). And, use “Software Updater” to install updates if any.

Uninstall Octave

To uninstall Octave Flatpak package, open terminal (Ctrl+Alt+T) and run command:

flatpak uninstall --delete-data org.octave.Octave

Also run flatpak uninstall --unused will remove useless run-time libraries.

To uninstall the Octave .deb package, run command:

sudo apt remove --autoremove octave

And, remove the PPA either by running command:

sudo add-apt-repository --remove ppa:ubuntuhandbook1/octave

or by using “Software & Updates” to remove source line under “Other Software” tab.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*