Installing latest version of GNU Octave when I have already installed other version
Solution 1
For uninstalling GNU Octave you can run this command:
sudo apt purge octave
But you don't need to remove and then install latest version of Octave.
You can easily upgrade that package with this commands:
sudo add-apt-repository ppa:octave/stable
sudo apt update
sudo apt install octave
These commands upgrade Octave to latest stable version of this software (with no need to remove current version).
Solution 2
You can run the newest version of Octave (5.1.0 in March 2019) by running it as a Flatpack app. "Flatpack is a system for building, distributing, and running sandboxed desktop applications on Linux."
The installation procedure is described here: https://flathub.org/apps/details/org.octave.Octave at the bottom of the page.
A more complete set of commands looks like the following section:
If you are on Ubuntu 16.04, You have to install flatpack first, then run Octave:
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt install flatpak
# optional line, AFAIK (pulls in Gnome deps?):
sudo apt install gnome-software-plugin-flatpak
# this line possibly required on Debian systems
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave --gui
This downloads about 900 MB from the internet.
For convenience in starting Octave from the command line, you can create the files /usr/share/octave
with the contents
#!/bin/sh
flatpak run org.octave.Octave --gui
and /usr/share/octave-cli
with content
#!/bin/sh
flatpak run org.octave.Octave
Related videos on Youtube
saidaspen
Updated on September 18, 2022Comments
-
saidaspen over 1 year
I have installed Gnu Octave by using
apt-get install octave
.
This installed version 4.0.3 on my machine.I want to install the latest available version. How can I:
- Uninstall the version I have?
- Install the latest version?
-
Ali Razmdideh over 6 yearsWhich version of Ubuntu do you use ? \\ if you are using zesty (17.04) you can use this commands for adding this repository
sudo sed -i 's/zesty/xenial/g' /etc/apt/sources.list.d/octave-ubuntu-stable-zesty.list && sudo apt update
-
saidaspen over 6 yearsAfter running this, it says: octave is already the newest version (4.0.3-3ubuntu1). However on octaves webpage it says that 4.2.1 has been released :(
-
tardis almost 6 yearsIf a new software is released upstream (by the original authors) it is not automatically in the Ubuntu repository. The Ubuntu maintainers have to create the packages and so on. Within a Ubuntu release (i.e. 18.04) packages only get security updates and few packages get major updates like firefox, thunderbird, chromium.
-
tverrbjelke about 5 yearson my Debian stretch (9, stable) you also must add the repo, which is done by
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
-
ddas over 4 yearsIt worked. Successfully installed Octave 4.2.2 on Ubuntu 16.04. Thanks.