Time for action - building Octave from source
Perform the following actions step-by-step:
1. Download the latest stable release of Octave from http://www.gnu.org/software/octave/download.htm and save it to any directory. The file will be a compressed and archived file with extension
.tar.gz
.2. Open a terminal and enter the directory where the source was downloaded. To unpack the file, type the following:
$ tar zxf octave-version.tar.gz
3. Here
version
will be the version number. This command will create a directory namedoctave-version
.4. To enter that directory type the following:
$ cd octave-version
5. We can now configure the building and compiling processes by typing the following:
$ ./configure
6. If the configuration process is successful, then we can compile the Octave source with the following command(this will take a while):
$ make
7. Before doing the actual installation, you should test whether the build was done properly. To do so, type the following:
$ make check
8. Some of the tests may fail. However, this does not mean that the build was unsuccessful. The test is not mandatory.
9. To install Octave on the computer, you need to have root privileges. For example, you can use the following:
$ sudo make install
10. Now type in the root password when prompted. That is it!
What just happened?
As you can see, we just performed the standard UNIX installation procedure: configure, make, make install
. If you do not have root privileges, you cannot install Octave on the computer. However, you can still launch Octave from the bin/
sub-directory in the installation directory.
Again, the preceding installation will only install Octave and not the plotting program. You will need to have this installed separately for Octave to work properly.
Note
I recommend that you have Emacs installed under GNU/Linux, because Octave uses this as the default editor. You will learn how to change the default editor later.