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?
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
For Ubuntu 20.04, see this answer.
update
the repositories are not showing octave 3.6. I am searching in both synaptic and apt-get
May 18, 2012 at 9:47
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
./configure
make
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.
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.
I am only "answering" this because I could not format in the comments. kudos to @izx and @Brenton Horne
For 14.0.4.2, 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.
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.
Latest ppa is ppa:octave/stable.
https://launchpad.net/~octave/+archive/ubuntu/stable
This ppa is maitained by the "GNU Octave" team and has version 3.8.1 available for lucid and precise.