Building: Difference between revisions

Jump to navigation Jump to search
249 bytes added ,  28 October 2019
→‎Tweaks: Overhaul section.
(→‎Uninstall: Overhaul section.)
(→‎Tweaks: Overhaul section.)
Line 196: Line 196:
== Tweaks ==
== Tweaks ==


Installing in your home directory is a method to install GNU Octave next to your repository installation at the same time. This works with every Linux distribution and is especially for old Ubuntu LTS versions very useful!
=== Install Octave in home directory ===


One advantage is that you do not clutter your system by running ''sudo make install''.
To install multiple versions of GNU Octave on one system, it is recommended to use the <code>--prefix</code> option of the <code>configure</code> script.  With this option one can determine a custom installation directory, preferably within your user's home directory, to avoid elevated installation privileges.  One does not "clutter" the system by running <code>sudo make install</code> and the custom build Octave can coexist with, for example, your Linux distribution installation of Octave.
Another advantage is that you can keep your Octave installation that is provided by your distribution.


=== Create a smart .bashrc entry ===
In order to start the custom build of Octave almost as convenient as the Linux distribution installation of Octave, one can create an alias within {{Path|.bashrc}}:


  echo "alias octave38='~/.octave38/bin/octave'" >> ~/.bashrc
  echo "alias octave38='~/.octave38/bin/octave'" >> ~/.bashrc
  . ~/.bashrc # this will update your bashrc without doing logout and login!
  . ~/.bashrc # this will update your bashrc without doing logout and login!


If you simply enter ''octave'', you'll start your repository installation provided by your distribution. But when you enter ''octave38'', you'll start your new snappy octave version installed to your home directory.
If you simply enter <code>octave</code>, you'll start your Linux distribution installation of Octave. But when you enter <code>octave38</code>, you'll start your custom build of Octave inside your home directory.




Navigation menu