1,852
edits
(→External tools and libraries: Revisit and update links.) |
(Merge important content from Octave in home directory.) |
||
Line 193: | Line 193: | ||
| Provided "as is" -- various authors | | Provided "as is" -- various authors | ||
|} | |} | ||
== 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! | |||
One advantage is that you do not clutter your system by running ''sudo make install''. | |||
Another advantage is that you can keep your Octave installation that is provided by your distribution. | |||
=== Create a smart .bashrc entry === | |||
echo "alias octave38='~/.octave38/bin/octave'" >> ~/.bashrc | |||
. ~/.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. | |||
=== Managing your own program hierarchy (optional) === | |||
If you intend to compile for yourself a lot of utilities, you may use a specific "usr" hierachy into your own dir (Linux from scratch way). Go back to step 2, and configure octave as: | |||
./configure --prefix=${HOME}/usr | |||
The other steps (make; make install) do not change. In order to use your own hierachy, you should set a few environment variables in your .profile: | |||
# set LD_LIBRARY_PATH if not set | |||
(echo $LD_LIBRARY_PATH | grep -q lib) || export LD_LIBRARY_PATH="/usr/local/lib:$HOME/usr/lib:$HOME/usr/local/lib" | |||
# set PATH so it includes user's private bin if it exists | |||
if [ -d "$HOME/bin" ] ; then | |||
(echo $PATH | grep -q $HOME/usr/bin) || export PATH="$HOME/bin:$HOME/usr/bin:$HOME/usr/local/bin:$PATH" | |||
fi | |||
# set MANPATH so it includes user's private bin if it exists | |||
if [ -d "$HOME/usr/share/man" ] ; then | |||
(echo $MANPATH | grep -q $HOME/usr/share/man) || export MANPATH="$HOME/usr/local/share/man:$HOME/usr/share/man:`manpath -q`" | |||
fi | |||
if [ -d "$HOME/usr/share/info" ]; then | |||
export INFOPATH="$INFOPATH:$HOME/usr/share/info" | |||
fi | |||
if [ -d "$HOME/usr/lib/python" ]; then | |||
(echo $PYTHONPATH | grep -q $HOME/usr/lib/python) || export PYTHONPATH="$HOME/usr/local/lib/python:$HOME/usr/lib/python" | |||
fi | |||
if [ -d "$HOME/usr/lib/pkgconfig" ]; then | |||
(echo $PKG_CONFIG_PATH | grep -q $HOME/usr/lib/pkgconfig) || export PKG_CONFIG_PATH="$HOME/usr/lib/pkgconfig" | |||
fi | |||
This way, most ordinary commands like "man octave", "info octave", or launching octave itself, will first explore your own hierachy. | |||
=== Uninstall === | |||
==== Method A ==== | |||
If you're still have the compiled source folder, just do ''make uninstall'' from it. And don't forget to remove the ''alias octave38'' entry in your ''~/.bashrc''. | |||
==== Method B ==== | |||
Just delete (e.g. ''rm -rf ~/.octave38/'') the install folder and remove the ''alias octave38'' entry from your ''~/.bashrc''. | |||
== See also == | == See also == | ||
* [https://hg.savannah.gnu.org/hgweb/octave/file/ | * [https://hg.savannah.gnu.org/hgweb/octave/file/tip/README <code>README</code>] and [https://hg.savannah.gnu.org/hgweb/octave/file/tip/etc/HACKING.md <code>/etc/HACKING.md</code>] in the development repository. | ||
* https://octave.org/doc/interpreter/Installation.html | * https://octave.org/doc/interpreter/Installation.html | ||