This tutorial/note is used to guide how to install Octave on Ubuntu and other Linux systems through the source code.
Octave Introduction
Octave is the GNU-based mathematical tool software for MATLAB, which is highly compatible with MATLAB and supports some unique syntax that is clearer and more consistent with the Linux community's habits. While some specific toolkits and parts of the features and efficiency are not as good as MATLAB, but for the general user, it is a valid and legitimate free replacement tool for MATLAB.
Prior to version 3.8, the official GUI interface was not available, and third-party tools (such as Qtoctave) must be downloaded to use the GUI.
Version 3.8 has been added to the experimental GUI interface. Starting with the 4.0 version the GUI interface became the default feature.
Compile and install under Ubuntu
Windows users and some Linux versions of users can directly enjoy the octave officially compiled version 4.0, other versions of users can only compile themselves from the source code.
As we all know, Ubuntu official source of the software upgrade followed very slowly, in the author wrote this tutorial "2015-07-14", Ubuntu official source on the latest version of 3.8.1.
The steps are as follows:
sudo apt-get build-dep octavesudo apt-get install libportaudio-dev libqt4-opengl-dev #for gui#sudo apt-get install libqt4-dev libqscintilla2-dev #for gui, (unnecessary for Ubuntu)#sudo apt-get install llvm #for jitwget https://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gztar xzf octave-4.0.0.tar.gzcd octave-4.0.0./configure#./configure --enable-jitmakemake checksudo make install
Description
- Installing dependent libraries
– Self-pressing too hard, use Apt-get's BUILD-DEP feature to automatically install the required libraries based on the old version of Octave that are already on the source
– In order to use the GUI, you also need to supplement Libportaudio-dev Libqt4-opengl-dev, otherwise you will see a warning "Qt libraries not found–disabling GUI" after configure. The resulting compiled octave has no GUI.
– If you need to use JIT to speed up the loop, you need to install LLVM
- Download Unzip source Package
– After octave upgrade, be careful to enter the correct file name
- Configure
– If JIT is required, add –enable-jit
– Other options Please enter the ./configure --help
command to view
– Watch for the final summary and warning of the output, and fill in the relevant libraries as needed (bison some of the icon-related libraries may not be filled, see the warning for details)
- Compile
– Best make check to see if compilation is successful and correct
- Install to the system library (if you need to)
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Ubuntu compiled by Source Octave 4.0